I am trying to add content to an accordion and create accordion panes dynamically.
I have the following accordion code...
<asp:Accordion ID="Accordion2" runat="server">
<HeaderTemplate><asp:Label ID="Label12" runat="server" Text='<%# Bind("Name") %>'><%#DataBinder.Eval(Container.DataItem, "Name" )%></asp:Label>
<ContentTemplate><asp:Label ID="Label12" runat="server" Text='<%# Bind("Name") %>'></asp:Label> </ContentTemplate>
And I was trying to add content to it by using the following...
DataSet dst = new DataSet();
dst = rubbish.GetCompetitions();
Accordion2.DataSource = dst;
Obviously that did not work, and I'm sure its not as straight forward as that. Does anyone know how I can do it?
View Complete Post