Hi,
I've got a UserControl that contains a CMSRepeater control:
<cms:CMSRepeater ID="CMSRepeaterShapes" runat="server" ClassNames="My.Document">
<ItemTemplate><%# RenderShapeLink(Eval("DocumentName").ToString(), Eval("NodeAliasPath").ToString()) %></a></ItemTemplate>
<SeparatorTemplate> / </SeparatorTemplate>
</cms:CMSRepeater>
RenderShapeLink() is a function in the UserControl code behind.
My UserControl is included on a TemplatePage and relies on a Property being assigned to it in the TemplatePage's Page_Init().
Amazingly, CMSRepeater evaluates before Page_Init() has been fired. This causes the RenderShapeLink() method to run before the critical value in the UserControl has been set.
Even worse, I cannot set the UserControl's required Property in Page_PreInit() because the control has not been created in memory by that stage.
I'm having to use a standard Repeater now instead, and set everything manually.
What's going on here? Why does CMSRepeater evaluate so early in the ASP.NET page lifecycle?