Link to home
Start Free TrialLog in
Avatar of barkin
barkin

asked on

Usercontrols Not Showing

Under ASP.NET v1.1 we've created a web application which contains a single user control (main.ascx).  The usercontrol is composed of a single ASP:placeholder.  This control executes code to dynamically load other user controls (via LoadControl) and makes use of reflection to obtain the parameters of their respective class.  Once the dynamicly loaded user control is read in, it is added to the ASP:placeholder to be shown on screen.  

The problem we're facing is on Postback the dynamically loaded controls aren't be reshown on screen.  The same code is executing (similar to the first time through) but this time the web page is blank.  Steping thru the code after postback I can see the ASP:placeholder contains the dynamically loaded user control.

Also, each dynamically loaded user control contains event handlers for button clicks on buttons contained within the user control page.  These events are never called on clicking the buttons -- there is a post back, which calls the original default.aspx page and the main.ascx control.

Am i working with placeholders, controls, and postbacks incorrectly?
ASKER CERTIFIED SOLUTION
Avatar of the_paab
the_paab

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial