aspnetpage 分页控件 谁写的

2024-12-04 18:26:42
推荐回答(1个)
回答1:

datatable dt = new datatable();
this.AspNetPager1.RecordCount = int.Parse(dt.Rows.Count.ToString().Trim());
int intPageIndex = 0;
int intPageSize = 10;
this.AspNetPager1.PageSize = intPageSize;
DataTable dtSource = PageList.GetCurrentPage(intPageIndex, intPageSize, sqlstr);
最后的这个dtSource才是数据源