Share via


DataPager Web Server Control Declarative Syntax

Enables paging of data that is displayed by a control that implements the IPageableItemContainer interface, such as the ListView control.

<asp:DataPager
    EnableTheming="True|False"
    EnableViewState="True|False"
    ID="string"
    OnDataBinding="DataBinding event handler"
    OnDisposed="Disposed event handler"
    OnInit="Init event handler"
    OnLoad="Load event handler"
    OnPreRender="PreRender event handler"
    OnUnload="Unload event handler"
    PagedControlID="string"
    PageSize="integer"
    runat="server"
    SkinID="string"
    Visible="True|False"
>
        <Fields>
            <asp:NextPreviousPagerField
                ButtonCssClass="string"
                ButtonType="Button|Image|Link"
                FirstPageImageUrl="string"
                FirstPageText="string"
                LastPageImageUrl="string"
                LastPageText="string"
                NextPageImageUrl="string"
                NextPageText="string"
                PreviousPageImageUrl="string"
                PreviousPageText="string"
                RenderDisabledButtonsAsLabels="True|False"
                RenderNonBreakingSpacesBetweenControls="True|False"
                ShowFirstPageButton="True|False"
                ShowLastPageButton="True|False"
                ShowNextPageButton="True|False"
                ShowPreviousPageButton="True|False"
                Visible="True|False"
            />
            <asp:NumericPagerField
                ButtonCount="integer"
                ButtonType="Button|Image|Link"
                CurrentPageLabelCssClass="string"
                NextPageImageUrl="string"
                NextPageText="string"
                NextPreviousButtonCssClass="string"
                NumericButtonCssClass="string"                 PreviousPageImageUrl="string"
                PreviousPageText="string"
                RenderNonBreakingSpacesBetweenControls="True|False"
                Visible="True|False"
            />
            <asp:TemplatePagerField
                OnPagerCommand="PagerCommand event handler"
                Visible="True|False"
            />
        </Fields>
</asp:DataPager>

Remarks

For more information, see the DataPager class overview.

See Also

Concepts

ASP.NET Server Controls

Reference

DataPager

Other Resources

Web Server Control Syntax