In ObjectDataSource we can utilize database for paging and sorting but in SqlDataSource control this feature does not exist, am I right?
SqlDataSource seems to be able to return data in either a DataReader or DataSet, then try to run sorting and paging based on the DataSet returned. Even if there is a 1,000,000 records in the DataSet.
If you are using a sql datasource instead of object datasource, you can try to implement custom paging on database side using stored procedure. See link below for possible guideline:
ericyzhou
Member
2 Points
23 Posts
So SqlDataSource can not do sorting and paging on database side like ObjectDataSource does?
Apr 25, 2012 08:46 AM|LINK
In ObjectDataSource we can utilize database for paging and sorting but in SqlDataSource control this feature does not exist, am I right?
SqlDataSource seems to be able to return data in either a DataReader or DataSet, then try to run sorting and paging based on the DataSet returned. Even if there is a 1,000,000 records in the DataSet.
Then what is the advantage for SqlDataSource?
sorting sqldatasource objectdatasource
bakra
Member
342 Points
59 Posts
Re: So SqlDataSource can not do sorting and paging on database side like ObjectDataSource does?
Apr 25, 2012 06:09 PM|LINK
If you are using a sql datasource instead of object datasource, you can try to implement custom paging on database side using stored procedure. See link below for possible guideline:
http://www.aspsnippets.com/Articles/Custom-Paging-in-ASP.Net-GridView-using-SQL-Server-Stored-Procedure.aspx
Please "Mark as Answer" if this helped you
sorting sqldatasource objectdatasource