aspnetpager常用数据绑定函数

public void BindAspNetPager()
    {
        this.AspNetPager1.RecordCount = Int32.Parse(sqlHelperWithParameter.GetScalar("select count(*) from [admin]").ToString());
        int pageIndex = this.AspNetPager1.CurrentPageIndex - 1;
        int pageSize = this.AspNetPager1.PageSize = 10;
        Repeater1.DataSource = sqlHelperWithParameter.GetDataSet2(pageIndex, pageSize, "select * from [admin]");
        Repeater1.DataBind();
    }

 

 protected void AspNetPager1_PageChanged(object sender, EventArgs e)
    {
        BindAspNetPager();
    }

 

 <webdiyer:AspNetPager ID="AspNetPager1" runat="server" Width="100%" NumericButtonCount="6" UrlPaging="True" NumericButtonTextFormatString="[{0}]" CustomInfoHTML="第 <font color=‘red‘><b>%CurrentPageIndex%</b></font> 页 共 %PageCount% 页 显示 %StartRecordIndex%-%EndRecordIndex% 条" ShowCustomInfoSection="Left"
        FirstPageText="首页" LastPageText="末页" NextPageText="下页" PrevPageText="上页" Font-Names="Arial" AlwaysShow="true" ShowInputBox="Always" SubmitButtonText="跳转" SubmitButtonStyle="botton" OnPageChanged="AspNetPager1_PageChanged">
    </webdiyer:AspNetPager>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

 

aspnetpager常用数据绑定函数,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。