Saving state after moving to another page.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What is the recommended approach for the following scenario?

I have a page that has a button that when clicked transfers to a new page
where the user selects an item from a list. Once that item is selected, I'd
like to transfer back to the original page, BUT I need that page with the
same state when the user clicked the button.

I am using ASP.Net 2.0
 
One of the simplest solutions is to have one page that acts like two, by
having two different panels in it. You'll only show one panel at a time.
That way everything can be kept in viewstate the whole time.
 
Thanks Steve, that would definitely work, but seems like a less than ideal or
a "non-standard" approach for a seemingly very common scenario. Is that how
most handle it?
 
Actually, for a simple scenario such as you describe it is a very common
solution.
It's not the most efficient possible solution, but it is the simplest and
most maintainable.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
 
Back
Top