I have created web page that retrives data from SQL database and display it to the user in well formatted manner. Data retrieved depend upon criterias selected by the user. But sometimes data retrieved is very large. I want to display records to the user page wise, i.e. 100 records on first page and next 100 records displayed when user clicks next button. This means only 100 records should be retrieved when user first select search criteria, next 100 records retrived when he clicks next button and so on, as to reduce data transferred from server to client. Please suggest me how to achieve this as soon as possible. Thanks in advance.

I have created web page that retrives data from SQL database and display it to the user in well formatted manner. Data retrieved depend upon criterias selected by the user. But sometimes data retrieved is very large. I want to display records to the user page wise, i.e. 100 records on first page and next 100 records displayed when user clicks next button. This means only 100 records should be retrieved when user first select search criteria, next 100 records retrived when he clicks next button and so on, as to reduce data transferred from server to client. Please suggest me how to achieve this as soon as possible. Thanks in advance.

How about your first query starting with a SELECT TOP 100 clause, and following that one, to query the following 100, do another TOP 100 starting from (or after) the last value retrieved by the first query, and so on?

This article has been dead for over six months. Start a new discussion instead.