hello,
i am using this code for paging it works best till have less data now its showing
1 2 3 .... till 182
i want to show it like
1 2 3 4 5 6 7 8 9 10 Next onclick on Next then again show next ten page
11 12 13 14 15 16 17 18 19 20 Next
and so on please advice
double dblPageCount = (double)((decimal)recordCount / 24);
int pageCount = (int)Math.Ceiling(dblPageCount);
List<ListItem> pages = new List<ListItem>();
if (pageCount > 0)
{
pages.Add(new ListItem("First", "1", currentPage > 1));
for (int i = 1; i <= pageCount; i++)
{
pages.Add(new ListItem(i.ToString(), i.ToString(), i != currentPage));
}
pages.Add(new ListItem("Last", pageCount.ToString(), currentPage < pageCount));
}
rptPager.DataSource = pages;
rptPager.DataBind();