Link to home
Start Free TrialLog in
Avatar of Chrisbzd
Chrisbzd

asked on

Dynamic Loading of Controls

I'm trying to add controls to a page dynamically with C#.

On one page I have a button that when clicked calls:

controls.People p = new controls.People();                              
plcChildren.Controls.Add(p);

On the Page Load of the People control I want to bind a datagrid that is declared in the mark up, but I keep getting the exception that the datagrid is not defined. I also tried by overrideing the Render method. How do you make the control load all its data.



ASKER CERTIFIED SOLUTION
Avatar of LlamaJoe
LlamaJoe

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