How to load a page with its default values after a postback

Posted by Shrage Smilowitz on Stack Overflow See other posts from Stack Overflow or by Shrage Smilowitz
Published on 2010-05-14T00:31:30Z Indexed on 2010/05/14 0:34 UTC
Read the original article Hit count: 345

Filed under:
|
|
|

I'm creating user controls that i will put into an update panel and make them visible only when required using triggers. Once visible it will float in a dialog box so it has a close button which will just hide the control on client side.

The controls have multiple post back states, like a wizard, i'm using a multi view control to accomplish that. My problem is that once the user is at step number two in the control, if the user closes the dialog, than opens the dialog again, (note that the control is made visible on the server and reloaded by updating the updatepanel) the second step will still be displayed. The reason is . because whenever there is a postback the control will load its state using the viewstate, even if EnableViewState is false it will still load it using the LoadControlState method. so my quesion is how can i force a user control to load fresh with its default values without any postback data.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about user