首页 > 其他 > 详细

Repeater分页

时间:2014-01-16 20:15:22      阅读:288      评论:0      收藏:0      [点我收藏+]

        void BindData()
        {
            PagedDataSource pds = new PagedDataSource();            
            pds.DataSource = Infos;
            pds.AllowPaging = true;
            pds.PageSize = 10;//取控件的分页大小
            pds.CurrentPageIndex = this.AspNetPager1.CurrentPageIndex - 1;//显示当前页
            //设置控件
            this.AspNetPager1.RecordCount = Infos.Count;//记录总数
            this.AspNetPager1.PageSize = 10;
            Repeater1.DataSource = pds;
            Repeater1.DataBind();
        }
        protected void AspNetPager1_PageChanged(object sender, EventArgs e)
        {
            BindData();
        }

Repeater分页

原文:http://www.cnblogs.com/wangzhenghua/p/3518099.html

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