Sunday, July 20, 2008

Paging in Repeater Control

ASP.NET has three Web Controls namely DataGrid, DataList and Repeater that allow you to display your data in tabular format easily. Amongst the above three Web Controls the DataGrid Control is the most advanced and supports paging, templates etc. The other two controls are used in places where you need more control over the rendering of your data. One of the drawbacks with this controls is that they do not support paging!!

Paging simply means splitting data display (UI) over number of pages in order to facilitate easy to browse interface and minimize the data sent out to the client.

Some of the merits of paging are:
1) Easy to browse pages.
2) Faster to load pages on client side since the amount to display per page is less.
3) Less load on the database server, since for every user you only pull out a limited amount of data, rather than pulling out all the records for each client.

As I mentioned before, the DataList and Repeater controls are very flexible and there would be a large number of places you might want to use these controls. Even though these controls do not support Paging internally, in this article I will display a method using which, you can easily enable simple paging (previous , next ) in your Repeater controls.

Click here for more Details

Ref: http://www.dotnetspider.com/resources/1041-Paging-Repeater-Control.aspx

No comments: