| Stefan [MSFT] 2006-09-16, 1:34 pm |
| Hi Tim,
all child controls have to be created in CreateAuthoringChildControls and
CreatePresentationChildControls.
EnsureChildControls will ensure that the above methods are called in case
they haven't.
Inside the LoadPlaceholderContentFor... method you should only read content
and add to the controls created above.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
"Tim Harmon" <tharmon@trpa.org> wrote in message
news:uGw56hq1GHA.4108@TK2MSFTNGP04.phx.gbl...
> Ok great got the control to work however there aren't any child control
> elements in the literalControl. I did notice that in stefan's code for
> the alltag html placeholder there is the following
> protected override void
> LoadPlaceholderContentForPresentation(Pl
aceholderControlEventArgs e)
>
> {
>
> EnsureChildControls();
>
> base.Html = UnEscape(((HtmlPlaceholder)(base.BoundPlaceholder)).Html);
>
> }
>
> Based on my limited research the EnsureChildControls Procedre checks to
> see if there are any child controls and if not creates them. So how would
> the control know there are any child controls unless the html is loaded
> first or am I missing the logic compleately? for example wouldnt you use
> it this way.
>
> protected override void
> LoadPlaceholderContentForPresentation(Pl
aceholderControlEventArgs e)
>
> {
>
> base.Html = UnEscape(((HtmlPlaceholder)(base.BoundPlaceholder)).Html);
>
> EnsureChildControls();
>
> }
>
>
> -Tim
> --
> Tim Harmon
> TIIMS Database Administrator
> "Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
> news:ONRBfdY1GHA.3908@TK2MSFTNGP05.phx.gbl...
>
>
|