public void fillGrid() { DataTable UserProfilesTable = new DataTable(); UserProfilesTable = VSWebBL.SecurityBL.UserProfileMasterBL.Ins.GetAllData(); try { Session["UserProfilesNameTable"] = UserProfilesTable; UserProfileView.DataSource = UserProfilesTable; UserProfileView.DataBind(); } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } }
public void fillGridfromSession() { DataTable UserProfilesTable = new DataTable(); if (Session["UserProfilesNameTable"] != "" && Session["UserProfilesNameTable"] != null) { UserProfilesTable = (DataTable)Session["UserProfilesNameTable"]; } try { UserProfileView.DataSource = UserProfilesTable; UserProfileView.DataBind(); } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } }