Asp.net| Control | difference | data
Data binding is further simplified in asp.net2.0, and the base class of the bound control comes from BaseDataBoundControl, you can go to
Http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.basedataboundcontrol_members (vs.80). aspx
View this class
If you view the members of this class, note the following two properties and methods
Virtual object DataSource {get; set;}
Virtual string DataSourceId {get; set;}
protected abstract void Performselect ();
protected abstract void ValidateDataSource (object dataSource);
What did you see?
Think about the steps you've made, asp.net1.x.
DATAGRID1.DATASOURCE=DATASET1.TABLE[0];
Datagrid1.databind ();
Looking at the work in asp.net2.0.
Gridview.datasourceid=datasource1;
In fact
In asp.net1.x, if you use the DataSource property, the ValidateDataSource method is automatically invoked
In asp.net2.0, if you use the DataSourceID property, the Performselect method is automatically invoked