Going back to previous page
-
On page 1 the datagrid is blank. The user clicks a button to populate the datagrid. Then the user clicks another button to go to page 2. But when the users goes back to the first page the datagrid is no longer populated. How can I keep the datagrid from losing its data? Thanks
-
On page 1 the datagrid is blank. The user clicks a button to populate the datagrid. Then the user clicks another button to go to page 2. But when the users goes back to the first page the datagrid is no longer populated. How can I keep the datagrid from losing its data? Thanks
Quickest way is to store contents of datagrid in session. if calling page is page2 then populate grid from session. Thanks
-
Quickest way is to store contents of datagrid in session. if calling page is page2 then populate grid from session. Thanks
-
when user clicks button to load data you can save datasource in session like below. Session["GridData"] = ds in page_load function of page1 you have to write code like below. if(Session["GridData"] != null && Request.UrlReferrer.ToString() == "Page2") { DataGrid1.DataSource = (DataSet) Session["GridData"]; DataGrid1.DataBind(); } Thanks
-
when user clicks button to load data you can save datasource in session like below. Session["GridData"] = ds in page_load function of page1 you have to write code like below. if(Session["GridData"] != null && Request.UrlReferrer.ToString() == "Page2") { DataGrid1.DataSource = (DataSet) Session["GridData"]; DataGrid1.DataBind(); } Thanks