Groups | Blog | Home
all groups > asp.net building controls > march 2004 >

asp.net building controls : dynamic creation of user controls


Jill Graham
3/25/2004 12:53:38 PM
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

Victor Garcia Aprea [MVP]
3/25/2004 7:49:49 PM
Hi Jill,

Please take a look at this post[1] I made some time ago, it should really
help you understand whats going on with controls added dynamically. Let me
know if that helps,

[1] http://weblogs.asp.net/vga/archive/2003/08/11/23498.aspx

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

[quoted text, click to view]

AddThis Social Bookmark Button