I am trying to create an accessible accordion with the repeater. I need to populate a list in my headertemplate from an Eval in my ItemTemplate. I have a runat server but it's not shown in my codebehind. How can I populate the ul?
structure:
<asp:Repeater runat="server" ID="repeater1" OnItemDataBound="repeater1_ItemDataBound">
<HeaderTemplate>
<div class="accordion">
<ul class="tab-titles" role="tablist" runat="server" ID="tabtitles">
<li aria-controls="panel1" class="title" id="tab1" role="tab" tabindex="0">Tab 1</li>
<li aria-controls="panel2" class="title" id="tab2" role="tab" tabindex="0">Tab 2</li>
</ul>
</HeaderTemplate>
<FooterTemplate>
</div>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="category" runat="server" Text='<%# Eval("cat") %>' OnDataBinding="lblCat_DataBinding"></asp:Label>
code behind:
protected void lblCampus_DataBinding(object sender, EventArgs e)
{
// tabtitles not found, need to populate Tab 1 and Tab 2, not implemneted yet.
}