468,765 Members | 1,138 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

What does EnsureChildControls really Ensure?

EnsureChildControls makes sure CreateChildControls() is called

So then the children are "created"

What does "created" actually mean? Is only Constructor() call?
OnInit()? OnLoad()? ...?

Guessing EnsureChildControls() is recursive. Are the grandchildren
"created" to?
Nov 18 '05 #1
1 3185
Created means at least created and added to the parent's Controls
collection.

EnsureChildControls isn't recursive at all. Its little more than this:

if (!ChildControlsCreated)
{
CreateChildControls();
ChildControlsCreated = true;
}

Whether or when grandchild controls are created depends on the child
controls. If the child happens to call EnsureChildControls, then the
children of that child will be created.
--
John Saunders
John.Saunders at SurfControl.com
"Sally" <po**************@yahoo.com> wrote in message
news:ff**************************@posting.google.c om...
EnsureChildControls makes sure CreateChildControls() is called

So then the children are "created"

What does "created" actually mean? Is only Constructor() call?
OnInit()? OnLoad()? ...?

Guessing EnsureChildControls() is recursive. Are the grandchildren
"created" to?

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

220 posts views Thread by Brandon J. Van Every | last post: by
92 posts views Thread by Reed L. O'Brien | last post: by
6 posts views Thread by WindAndWaves | last post: by
1 post views Thread by Sally | last post: by
5 posts views Thread by Dimitris Pantazopoulos | last post: by
669 posts views Thread by Xah Lee | last post: by
1 post views Thread by shapper | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.