Partager via


Syntaxe déclarative du contrôle serveur Web DataPager

Mise à jour : novembre 2007

Active la pagination des données affichées par un contrôle implémenté par l'interface IPageableItemContainer, par exemple le contrôle ListView.

<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>

Notes

Pour plus d'informations, consultez la vue d'ensemble de la classe DataPager.

Voir aussi

Concepts

Contrôles serveur ASP.NET

Référence

DataPager

Autres ressources

Syntaxe des contrôles serveur Web