private void LoadData() { string solution = Convert.ToString(Request.QueryString[0]); BLLCollection <Solution_mst> col = new BLLCollection <Solution_mst>(); if (solution == "") { col = ObjSolution.Get_All(); } else { string kewords = solution; col = ObjSolution.Get_SearchSolution_All(kewords); } PagedDataSource pgitems = new PagedDataSource(); pgitems.DataSource = col; pgitems.AllowPaging = true; pgitems.PageSize = 5; pgitems.CurrentPageIndex = PageNumber; if (pgitems.PageCount > 1) { rptPages.Visible = true; ArrayList pages = new ArrayList(); for (int i = 0; i < pgitems.PageCount; i++) { pages.Add((i + 1).ToString()); } rptPages.Visible = true; rptPages.DataSource = pages; rptPages.DataBind(); } else { rptPages.Visible = false; } Repeter.DataSource = pgitems; Repeter.DataBind(); }