“Both DataSource and DataSourceID are defined” error using ASP.NET GridView

后端 未结 8 1842
死守一世寂寞
死守一世寂寞 2021-02-15 06:11

\"Both DataSource and DataSourceID are defined on \'grdCommunication\'. Remove one definition.\"

I just got this error today, the code has been working until this after

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-15 06:49

    I got this error today, turns out that it had nothing to do with DataSourceID, and had everything to do with the DatasSource itself.

    I had a problem in my DatasSource , and instead of getting a DatasSource related error, I got this meaningless error.

    Make sure you're DatasSource is good, and this error should go away.

提交回复
热议问题