Saving state after moving to another page.

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
 
S

Steve C. Orr [MVP, MCSD]

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.
 
G

Guest

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?
 
S

Steve C. Orr [MVP, MCSD]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top