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