Contact Form

Name

Email *

Message *

Pagging asp.net with c# Datapager Bootstrap

No comments


<div id="page-selection" class="pagination-centered" align="center">
    <asp:DataPager ID="DataPagerProducts" runat="server" PagedControlID="lstbrand"  class="btn-group btn-group-sm"
    PageSize="10" OnPreRender="DataPagerProducts_PreRender">
    <Fields>
         <asp:NextPreviousPagerField PreviousPageText="<" FirstPageText="|<" ShowPreviousPageButton="true"
                ShowFirstPageButton="true" ShowNextPageButton="false" ShowLastPageButton="false"
                ButtonCssClass="btn btn-default" RenderNonBreakingSpacesBetweenControls="false" RenderDisabledButtonsAsLabels="false" />
            <asp:NumericPagerField ButtonType="Link" CurrentPageLabelCssClass="btn btn-primary disabled"  RenderNonBreakingSpacesBetweenControls="false"
                NumericButtonCssClass="btn btn-default" ButtonCount="10" NextPageText="..." NextPreviousButtonCssClass="btn btn-default" />
            <asp:NextPreviousPagerField NextPageText=">" LastPageText=">|" ShowNextPageButton="true"
                ShowLastPageButton="true" ShowPreviousPageButton="false" ShowFirstPageButton="false"
                ButtonCssClass="btn btn-default" RenderNonBreakingSpacesBetweenControls="false" RenderDisabledButtonsAsLabels="false"/>
    </Fields>
</asp:DataPager></div>


protected void DataPagerProducts_PreRender(object sender, EventArgs e)
        {

            this.lstbrand.DataSource = new BLBrands().show();
            this.lstbrand.DataBind();
        }

No comments :

Post a Comment