K
Ken Varn
I have Page1 that does a transfer to page2. When the user is done with
Page2, there is a button on Page2 that they can press to bring them back to
Page1. I use Server.Transfer to navigate from one page to the next.
The confusion that I am having is that when the user is done with Page2 and
clicks on the button to bring them back to Page1, I want Page1 to basically
come back with the exact same view that it had before the user navigated
away from it. However, I notice that when Page1 comes back, the
Page.IsPostback is set back to false, so all of my initialization code gets
run. I also notice that my ViewState is gone. I was hoping that somehow
the return trip back to the original page would behave something like a
postback with the original Page1 ViewState intact.
Maybe I am just not understanding how to do this correctly, but it seems
like it should be pretty trivial to return back to a page as with its
original state intact. The only other option I would have is to call
JavaScript to navigate backwards in the history buffer, but that just
doesn't seem right.
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------
Page2, there is a button on Page2 that they can press to bring them back to
Page1. I use Server.Transfer to navigate from one page to the next.
The confusion that I am having is that when the user is done with Page2 and
clicks on the button to bring them back to Page1, I want Page1 to basically
come back with the exact same view that it had before the user navigated
away from it. However, I notice that when Page1 comes back, the
Page.IsPostback is set back to false, so all of my initialization code gets
run. I also notice that my ViewState is gone. I was hoping that somehow
the return trip back to the original page would behave something like a
postback with the original Page1 ViewState intact.
Maybe I am just not understanding how to do this correctly, but it seems
like it should be pretty trivial to return back to a page as with its
original state intact. The only other option I would have is to call
JavaScript to navigate backwards in the history buffer, but that just
doesn't seem right.
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------