there seems to be different scenarios when controls that are added to a
control's hiearchy are rendered. If you just add them to the hierachy and
don't override the control's render method i believe they will just get
rendered.
I have some scenarios where i have built/seen controls and they seem to
render their children differently:
1. A control inherited from webControl that overrides CreateChildControls to
add all of its controls to hierarchy. No render methods overridden. The
controls are rendered in the order i added them to control hierarchy
2. A control inherited from WebControl. It has controls added to hierachy
during load. It overrides Render and explicitely loops thru all its controls
and renders them (ReqFieldValidators, etc)
3. A control inherited from TextBox. It has controls added to hierachy
during load. It overrides Render and explicitely loops thru all its controls
and renders them (ReqFieldValidators, etc)
in #2, if i override RenderChildren it isn't called
in #2, if i override CreateChildControls, its called so i add a control
there, but RenderChildren is still not called (is it because i'm overriding
Render?).
i'm just confused. For #1 it seems like rendering is handled for me
automatically and in #2 & #3 i have to explicitely call render for all child
controls.
What is going on?
thanks