Finde Panel Inde i en Repeater
Hej jeg har nogen Problemer med jeg ikke kan finde mit Panel inde i min repeater men har gjort sådan her..protected void Repeater_brugerliste_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
RepeaterItem item = e.Item;
Panel panel1 = (Panel)item.FindControl("Panel_options1");
Panel panel2 = (Panel)item.FindControl("Panel_options2");
panel1.Visible = true;
panel2.Visible = ture;
}
<asp:Repeater ID="Repeater_brugerliste" runat="server" OnItemDataBound="Repeater_brugerliste_ItemDataBound">
<HeaderTemplate>
<form id="mainform" action="">
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
<tr>
<th class="table-header-check"><a id="toggle-all" ></a> </th>
<th class="table-header-repeat line-left minwidth-1"><a href="">Brugernavn</a> </th>
<th class="table-header-repeat line-left minwidth-1"><a href="">Fornavn</a></th>
<th class="table-header-repeat line-left minwidth-1"><a href="">Efternavn</a></th>
<th class="table-header-repeat line-left"><a href="">Email</a></th>
<asp:Panel ID="Panel_options1" Visible="false" runat="server"><th class="table-header-options line-left"><a href="">Options</a></th></asp:Panel>
</tr></HeaderTemplate><ItemTemplate>
<tr>
<td><input type="checkbox"/></td>
<td><%# Eval("brugernavn") %></td>
<td><%# Eval("fornavn") %></td>
<td><%# Eval("efternavn") %></td>
<td><a href=""><%# Eval("email") %></a></td>
<asp:Panel ID="Panel_options2" Visible="false" runat="server">
<td class="options-width">
<a href="" title="Ret" class="icon-1 info-tooltip"></a>
<a href="" title="Slet" class="icon-2 info-tooltip"></a>
</td></asp:Panel>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</form>
</FooterTemplate>
</asp:Repeater>