Both DataSource and DataSourceID are defined on 'GridView1'. Remove one definition

后端 未结 1 643
孤城傲影
孤城傲影 2021-01-26 03:10

I\'m using a gridview and SqlDataSource to bind the data table information to the gridview. On gridview update event I have the following code :

protected void          


        
1条回答
  •  -上瘾入骨i
    2021-01-26 03:44

    Do you really need to assign data source again if you emit this statement

      GridView1.DataSource = SqlDataSource1;
      GridView1.DataBind();
    

    and use

      SqlDataSource1.Update();
    

    There is an example of using datasource, i hope that will help you Datasource example

    0 讨论(0)
提交回复
热议问题