DataPager Component

The DataPager component provides paging functionality for data-bound controls. It supports numeric page buttons and next/previous navigation.

DataPager with Numeric Buttons

ID Name Price Category
1 Product 1 ¤10.99 Software
2 Product 2 ¤11.99 Hardware
3 Product 3 ¤12.99 Software


PagedControlID & QueryStringField

The PagedControlID property identifies the data-bound control being paged, and QueryStringField specifies a query string parameter for paging navigation. These are accepted for Web Forms migration compatibility.

PagedControlID: ProductListView — QueryStringField: page

<DataPager PagedControlID="ProductListView"
           QueryStringField="page"
           PageSize="4"
           Mode="PagerButtons.NextPreviousFirstLast" />

Code:

<DataPager TotalRowCount="@totalRows"
  PageSize="3"
  PageIndex="@pageIndex"
  PageIndexChanged="HandlePageChanged"
  Mode="PagerButtons.NumericFirstLast" />