4
我有一些代碼確定控件(在中繼器中)是否應該可見,我想在Page_Load上調用它,但我似乎無法獲取控件一箇中繼器。迭代器中迭代遍歷控件
<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始終是空的。
我該如何做到這一點?