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

 

转载于:https://www.cnblogs.com/karlzhao/p/3690598.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值