Author: int08h | Posted on: 6/8/2008 6:38:07 AM | Views : 361

Hello every, here is my requirement:

I have a Error.aspx which will display all error information, so whenever an error occurs in a page execution, it will use the Response.Redirect("Error.aspx?Message=xxx"); to redirect the user response.

However, what I need is that when user finishes reading the error message, he should be able to redirect back to previous page, all state of the previous page should be recovered.

 

In this case, my solution is:

1.Save all state in session

2.Redirect to Error.aspx

3.Redirect back, and call a method (such as Recover()) to restore the saved state

 

The problem is: How can I save the entire page state?

I have tried store ViewState to session but it does not work with common controls like TextBox, also the SavePageStateToPersistMedium and LoadPageStateToPersistMedium does not work for me, the SaveViewState and SaveControlState both return a null

Go to the complete details ...