Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > CreateChildControls... when and why?

Thread Tools

CreateChildControls... when and why?

Posts: n/a
I have several custom controls (which inherit from WebControl), I have
overriden the RenderContents of one of the custom controls. Within the
RenderContents function of this control (Control #1) I instantiate a
different custom control (Control #2) and call it's RenderControl function.
The CreateChildContents of Control #2 is never executed. I think this is
because Control #2 is not added to the control collection of Control #1.

When does CreateChildControls get called? When is it appropriate to use?
Most of my customer controls override load and render... what webcontrol
design benefits from CreateChildControls and how can I control when
CreateChildControls is fired?

Thanks for any help.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
if and and vs if and,and titi VHDL 4 03-11-2007 05:23 AM