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();
}