PagedDataSource pds = new PagedDataSource();
pds.DataSource = mydatatable.DefaultView;
pds.AllowPaging = true;
pds.PageSize = 10;
pds.CurrentPageIndex = currentpage;
count = pds.PageCount;
DataList1.DataSource = pds;
DataList1.DataBind();
if (Session["cp"] != null)
{
currentpage = (int)(Session["cp"]);
}
else
{
currentpage = 0;
}
currentpage += 1;
Session.Add("cp", currentpage);
filllist();
}
if (Session["cp"] != null)
{
currentpage = (int)(Session["cp"]);
}
else
{
currentpage = 0;
}
currentpage -= 1;
Session.Add("cp", currentpage);
filllist();
}