Re-loading a UserControl after PostBack

J

jon

I'm trying to establish how to replace a usercontrol that has already
been loaded (using LoadControl in the Page.Load event) with a
different UserControl following a PostBack. Tying to call
LoadControl(<newControlName>) after the Page.Load routine has finished
does not appear to work. The only way I can think of doing this is to
call Server.Transfer or Request.Redirect to start a new instance of
the form but this means I loose ViewState for the existing form which
I want to retain.

I need a means of re-firing the Page.Load routine after it has occured
without user ineraction.

Any thoughts greatly appreciated.


jon
 
K

KMA

Could you load the corresponding user control based upon the value of
Page.IsPostback in the Page.Load?
 

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