首页 > Web开发 > 详细

aspnetpager常用数据绑定函数

时间:2014-04-29 07:16:21      阅读:293      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
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();
    }
bubuko.com,布布扣

 

bubuko.com,布布扣
 protected void AspNetPager1_PageChanged(object sender, EventArgs e)
    {
        BindAspNetPager();
    }
bubuko.com,布布扣

 

bubuko.com,布布扣
 <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>
bubuko.com,布布扣
bubuko.com,布布扣
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
bubuko.com,布布扣

 

aspnetpager常用数据绑定函数,布布扣,bubuko.com

aspnetpager常用数据绑定函数

原文:http://www.cnblogs.com/karlzhao/p/3690598.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!