In ASP.net, when we pager on a Gridview or DetailsView than Gridview, we retrieve all the rows from the database each time.
Suppose our database contains 100 rows and we set up paging in Gridview with a page size of 10 records per page. But whenever we click on the gridview pager control for any particular page, no. then GridView should display only certain 10 rows from the database.
If we click on page number 3, then he should request only lines 21-30, but he will extract all the lines and ignore the rest. It is simply a loss of resources.
Can any of you suggest me a solution to this problem?
source
share