<p>I'm using the Repeater control on my site to display data from the database. I need to do pagination ("now displaying page 1 of 10", 10 items per page, etc) but I'm not sure I'm going about it the best way possible.</p>

<p>I know the Repeater control doesn't have any built-in pagination, so I'll have to make my own. Is there a way to tell the DataSource control to return rows 10-20 of a much larger result set? If not, how do I write that into a query (SQL Server 2005)? I'm currently using the TOP keyword to only return the first 10 rows, but I'm not sure how to display rows 10-20.</p>

[{'answer_id': 22992, 'author': 'Darren Kopp', 'author_id': 77, 'author_profile': 'https://Stackoverflow.com/users/77', 'pm_score': 3, 'selected': True, 'text': '<p>This isn\'t a way to page the data, but have you looked into the <a href="http://msdn.microsoft.com/en-us/library/bb398790.aspx" rel="nofollow noreferrer">ListView</a> control? It gives the flexibility of repeater / data list but with built in paging like the grid view.</p>\n\n<p>And for paging in sql, you would want to do something like <a href="http://www.davidhayden.com/blog/dave/archive/2005/12/30/2652.aspx" rel="nofollow noreferrer">this</a></p>\n'}, {'answer_id': 23000, 'author': 'jonezy', 'author_id': 2272, 'author_profile': 'https://Stackoverflow.com/users/2272', 'pm_score': 2, 'selected': False, 'text': '<p>You have to use the PagedDataSource, it allows you to turn a standard data source into one that can be paged.  Here\'s an <a href="http://www.codeproject.com/Kb/aspnet/pagingBySreejith%20Thathanattu.aspx" rel="nofollow noreferrer">example article</a></p>\n'}, {'answer_id': 23003, 'author': 'Eric Z Beard', 'author_id': 1219, 'author_profile': 'https://Stackoverflow.com/users/1219', 'pm_score': 0, 'selected': False, 'text': '<p>This was answered <a href="https://stackoverflow.com/questions/2840/paging-sql-server-2005-results">here</a>.</p>\n'}]
['https://Stackoverflow.com/questions/22981', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2527/']