Hi, mfarshadmehr:
You can also use the PagedDataSource in asp.net 2.0 for paging in datalist
private void BindData()
{
//ds fill
DataView dv = ds.Tables[0].DefaultView;
PagedDataSource Pds = new PagedDataSource();
Pds.DataSource = dv;
Pds.AllowPaging = true;
Pds.PageSize = 10;
int TotalCount = Pds.PageCount;
int CurrPage;
//get page index
CurrPage = Request.QueryString["Page"];
//databind
DataList1.DataSource = Pds;
DataList1.DataBind();
Best Regards,
__________________________________________________
Sincerely,
Rex Lin
Microsoft Online Community Support
This posting is provided "AS IS" with on warranties, and confers no rights.