Assiging parameters to sqldatasource

后端 未结 2 769
我在风中等你
我在风中等你 2021-01-25 16:01

I\'m trying to get data from SQL Server and use it in a formview, but the formview control won\'t get any data from the datasource.

(The datasource gets parameter on pag

2条回答
  •  面向向阳花
    2021-01-25 16:13

    It seems like you are adding 2 parameters here. One declarative and one in your code behind.

    Try to add only the parameter in your code behind. also change the name to idd instead of @idd.

    
    
    
    protected void Page_Load(object sender, EventArgs e)
     {
            SqlDataSource1.SelectParameters.Add("idd", "077763554");
            FormView1.DataBind();
     }
    

提交回复
热议问题