void binddata(int tid, int year) { DataTable dt = NewsInfoService.Get_NewsInfoViewListByYear(tid, year); AspNetPager1.RecordCount = dt.Rows.Count; if (dt.Rows.Count >= 0) { PagedDataSource ps = new PagedDataSource(); DataView dv = new DataView(dt); ps.DataSource = dv; ps.AllowPaging = true; ps.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1; ps.PageSize = AspNetPager1.PageSize; rptEventList.DataSource = ps; rptEventList.DataBind(); } }