Getting Top (starting no , Ending no) rows from sqlserver

Posted by Krishna Thota on Stack Overflow See other posts from Stack Overflow or by Krishna Thota
Published on 2012-09-13T09:36:31Z Indexed on 2012/09/13 9:37 UTC
Read the original article Hit count: 183

Filed under:
|
|
|
|

I'm using Grid view in my asp.net page and I'm fetching data from SQL Server and placing in my grid view.

Now my problem is, I'm using paging and placing 50 rows per page in Grid view. I would like to fetch top 50 rows from database in the start up and bind to the Grid View and when i click on next page, then again go to the database and fetch Second Top 50 rows and bind to GV. and this process hasto continue until last row is fetched from Database.

Can you tell me How to write Query in achieving this??

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET