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();
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.