void Pager1_onLoadPageIndexChaning(int pageIndex) { try { PagedDataSource pds = new PagedDataSource(); pds.DataSource = ExamineManager.SearchExamineByType(ddlTyep.SelectedItem.Text); Pager1.DataCount = pds.Count; pds.AllowPaging = true; pds.PageSize = 5; // if (pageIndex == Pager1.PageCount) //{ // pageIndex--; //} pds.CurrentPageIndex = pageIndex; Pager1.PageCount = pds.PageCount; gvExamine.DataSourceID = null; gvExamine.DataSource = pds; gvExamine.DataBind(); } catch (Exception) { return; } }