您的位置:首页 > 编程语言 > ASP

AspNetPager第三方控件分页代码

2009-04-02 10:17 417 查看
private void BindData() {

BLL.TrafficLine _TrafficLine = new Traffic.BLL.TrafficLine();

DataSet ds = _TrafficLine.GetAllList();

PagedDataSource pds = new PagedDataSource();

pds.AllowPaging = true;

pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;

pds.PageSize = 4;

AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;

pds.DataSource = ds.Tables[0].DefaultView;

Repeater1.DataSource = pds;

Repeater1.DataBind();

}

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: