gridview分页
GridView2.AllowPaging = true;
GridView2.PageIndex = 0;
GridView2.DataBind();
repeater 分页 通过 PagedDataSource CurrentPageIndex
DataTable dt = '连接数据库并查询'
PagedDataSource pds = new PagedDataSource();
pds.DataSource = dt.DefaultView;
pds.AllowPaging = true;
pds.PageSize = 2;
pds.CurrentPageIndex = Convert.ToInt32(this.labPage.Text) - 1;
Repeater1.DataSource = pds;