Last post Jul 25, 2011 03:47 AM by frez
Jul 25, 2011 02:51 AM|HenWagner|LINK
suppose I have a DataTable object in the Session, that I want to display in a GridView.
What would considered to be the best practice:
GridView1.DataSource = (DataTable) Session["MyTable"];
or going through an ObjectDataSource:
GridView1.DataSourceID = "ObjectDataSource1";
Jul 25, 2011 03:47 AM|frez|LINK
There is nothing wrong with using either. The advantage of the ObjectDataSource is when you have the potential for large datasets as you can implement more efficient paging and sorting.