I have SQL Server database and web application. I need pagination to view of records from DB same as Google. My query consists of 1000 records when I need to display page 2 I need records from 11-20. I want to fetch just these 10 records from the DB. I know I can query all 1000 records (this wastes time) and after that I can query the next 10 recordset. I need a better way to query the desired recordset - as an example when the user goes to page 5 (with 10 records per page) I need a query to get record 51-60 (just ten records) an this way is better for response time and network traffic.
best regards Hamidreza Abbasi