阅读背景:

如何使用ObjectDataSource在代码中正确设置数据表到gridview?

来源:互联网 

I have an ObjectDataSource with an ID of ObjectDataSource1 on a webpage. I also have a gridview in which I am binding the ObjectDataSource.ID to the GridView.DataSourceID. The problem I get is when text is changed in a textbox, the code calls BrokerageTransactions.GetAllWithDt which returns a DataTable. I want to set this datatable as the DataSource for the GridView, but it is telling me that I can't set the DataSouce and DataSourceId together. How can I fix this? Code is below. Also. Why can't you set a DataSourceID and a DataSource when using an ObjectDataSource?I have an ObjectDataSource with an ID of Object




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: