Author: exsurgo | Posted on: 12/10/2008 8:50:22 PM | Views : 338


 I have a Page which contains one of many different UserControls.  I need to be able to switch from one control to another depending on a button click in the first control.   The first time I click to switch to the second control, it works.   When I click on a button on the second control to switch to another control or the first control, it doesn't work.   Apparently, the controls have already been rendered and does not re-render after the control is added..   If I click on the button a second time, it then switches to the other control.    Is there any way to control which UserControls are loaded from UserControl events?

I need to be able to do this with a postback (not redirect or trasfer) becuase I'm maintaining state and using an update panel.  I'm also using a custom page class with an AddControl method ...

Go to the complete details ...