saving/loading state of page

H

headware

I've been reading about saving the state of the controls of a page so
the user can be redirected to another page and then return to the
original in the state it was in when they left. I've seen a lot of
conflicting answers on the subject.

Some people say that you can use the
LoadPageStateFromPersistenceMedium() and
SavePageStateToPersistenceMedium() functions to do this, but they
don't say how to get around the problem that the
LoadPageStateFromPersistenceMedium() function doesn't get called on
non-postback page loads.

Other people seem to be saying that trying to use these functions to
save the ViewState in the Session variable is not the way ViewState
was meant to be used and is a bad idea.

How can I save the state of the page? Do I have to save some kind of
hashtable in the Session object that contains all the controls on the
page and their corresponding values? Seems like a lot of work and
difficult to maintain. This must be a common problem that has a
well-known solution right?

Thanks,
Dave
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top