CreateChildControls... when and why?

Discussion in 'ASP .Net' started by DesignerX, Oct 30, 2003.

  1. DesignerX

    DesignerX Guest

    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.
    Stan
    DesignerX, Oct 30, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,804
    Smokey Grindel
    Dec 2, 2006
  2. Mark Olbert
    Replies:
    5
    Views:
    648
    Steven Cheng[MSFT]
    Feb 1, 2007
  3. ~~~ .NET Ed ~~~
    Replies:
    1
    Views:
    212
    ~~~ .NET Ed ~~~
    Mar 25, 2005
  4. ~~~ .NET Ed ~~~
    Replies:
    3
    Views:
    193
    Teemu Keiski
    Apr 4, 2005
  5. Umut Tezduyar
    Replies:
    4
    Views:
    430
    Steven Cheng[MSFT]
    Oct 27, 2004
Loading...

Share This Page