Dynamic creation of user controls

  • Thread starter Thread starter Jill Graham
  • Start date Start date
J

Jill Graham

In the page_onInit sub of my page, I'm adding user controls dynamically
using following code :

newControl = page.LoadControl("~/modules/footer.ascx")
page.controls.add(newControl)

In what state is the control I added ? The control has been initialized,
loaded, rendered ?

Jill
 
when control is added to the controls hierarchy it catches up to the life
cycle of its container (page) and later goes along with it
 
Back
Top