Hi Guys
I have 2 pages. Page_1 and Page_2.
In Page_1 I
EneableViewstate="true"
on top of the page.
Also Page_1 has a link that redirects to Page_2.
the code for
Page_Load()
of Page_1 is below.
if (!Page.IsPostBack)
{
loadgrdAvailableStaffOnPageLoad();
loadgrvViewAppointmentsOnPageLoad();
}
else if (Page.IsPostBack)
{
loadgrdAvailableStaffOnPageLoadViewState();
loadgrvViewAppointmentsOnPageLoadViewState();
}
In Page_2 I have button "cancel" with this code below
Response.Redirect("Page_1.aspx");
Now correct me if am wrong because am confuse.
On initial
Page_Load()
am expecting the application to go inside this "if" statement below:
if (!Page.IsPostBack)
{
loadgrdAvailableStaffOnPageLoad();
loadgrvViewAppointmentsOnPageLoad();
}
Then after coming back from Page_2, the application should be loading
this part:
else if (Page.IsPostBack)
{
loadgrdAvailableStaffOnPageLoadViewState();
loadgrvViewAppointmentsOnPageLoadViewState();
}
What can I do to restore Page_1 information after coming back from Page_2??