Using the DataPager Control

The DataPager control displays a user interface for navigating through multiple pages of items. The DataPager control works with any control that supports the IPageableItemContainer interface. Unfortunately, there is currently only a single control that supports this interface: the ListView control. So this means that you can only use the DataPager with the ListView control.

The DataPager control includes the following properties:

PageSize Gets or sets the number of items to display at a time.

PagedControlId Gets or sets the control to page. (The control must implement IPageableItemContainer.)

Fields Gets the fields contained by the DataPager.

StartRowIndex Gets the index of the first item to show.

Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.