private void BindPages() { try { DataTable dt = new DataTable(); dt = objPage.GetAllPages(); drpSubmenuPage.DataSource = dt; drpSubmenuPage.DataTextField = "PageName"; drpSubmenuPage.DataValueField = "ID"; drpSubmenuPage.DataBind(); drpSubmenuPage.Items.Insert(0, new ListItem("--Select--", "0")); } catch (Exception ex) { throw ex; } }
protected void FillGridData() { try { DataView dv = new DataView(); dv.Table = clsobj.GetAllPages(); if (strSortExpression != "" && strSortDirection != "") { dv.Sort = strSortExpression + " " + strSortDirection; } GrdPageList.DataSource = dv; GrdPageList.DataBind(); if (intPageIndex != 0) { GrdPageList.PageIndex = intPageIndex; } } catch (Exception ex) { throw ex; } }