Dynamic creation of user controls

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
 
K

Konrad Rotuski

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
 

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

Top