I have some code that determines whether the control (inside the repeater) should be visible or not, and I want to call it on the_Load page, but I cannot get the controls inside the repeater.
<asp:Repeater ID="repreat" runat="server" > <HeaderTemplate> <asp:PlaceHolder runat="server" ID="thActivePrimary">Blah</asp:PlaceHolder> <asp:PlaceHolder runat="server" ID="PlaceHolder1">Blah</asp:PlaceHolder> </HeaderTemplate> <ItemTemplate> <asp:PlaceHolder runat="server" ID="trActivePrimary">Blah</asp:PlaceHolder> <asp:PlaceHolder runat="server" ID="thActivePrimary2">Blah</asp:PlaceHolder> </ItemTemplate> </asp:Repeater>
repreat.Controls is always empty.
How do I achieve this?
source share