Wednesday, January 20, 2010

Paging in asp.net VB using the repeater control?

I would like to know where i can find a good article for paging in asp.net with the repeater control. I do not want to use stored procedures and it should only query the records which are visible on the page (not caching the whole dataset at once). Can someone help me in the right direction? Im using vb as languagePaging in asp.net VB using the repeater control?
Here's an article that teaches you how to page a repeater however all the records are returned from the database.


http://aspnet.4guysfromrolla.com/article鈥?/a>





You can easily query ONLY the records needed by enhancing the above technique. Instead of using the PagedDataSource object, define a Stored Procedure in your database that takes as parameters the PageIndex you are seeking and the PageSize. An example of such a stored procedure can be found here under TIP2:


http://msdn.microsoft.com/msdnmag/issues鈥?/a>





If you are using SQL Server 2005 (or even SQL Express Edition), you can refer to this article:


http://weblogs.asp.net/scottgu/archive/2鈥?/a>





Hope this helps.

No comments:

Post a Comment