On Aug 21, 4:13 pm, "Cowboy \(Gregory A. Beamer\)"
<NoSpamMgbwo...@comcast.netNoSpamM> wrote:
> Or you can expose a public (or internal?) property on the user control and
> set it using the normal Eval() to pull data and set the property with it.
> Provided, of course, the setting is in the data you are binding to the
> repeater.
okay.
However, if for some reason, it's not possible to do it in the markup,
we would need to use ItemCreated event. Correct?
> When you think of user controls as black boxes, much like other controls,
> you find you can treat them the same way.
My trouble is that the user control has used the property (in
question) in its OnInit event. Is it guaranteed that OnInit of user
control will be called after ItemCreated event of parent repeater
control? This is not clear in MSDN documentation for "ASP.NET Page
Life Cycle Overview" <
http://msdn2.microsoft.com/en-us/library/
ms178472.aspx>.
Thanks.
- Satyajit
"satyajit" <satyajit...@gmail.com> wrote in message
>
> news: oups.com...
>
> >I am working on an application that has a Web User Control contained
> > within <ItemTemplate> of a Repeater control. The Web User Control has
> > a public property that needs to be assigned in order to work correctly
> > (the web user control uses this object to initialize DataSource of
> > some of its child controls). Is it correct to use Repeater's
> > ItemCreated event to assign value to the above mentioned public
> > property? If not, what are the alternatives?
>
> > I also want to know at which stage of life-cycle of the contained Web
> > User Control, the ItemCreated event of the repeater control will be
> > invoked?