Within the accordion control, it is possible to bind data to
the header and content templates. However, the header and content template have
a one-to-one relationship, meaning that one header template matches one content
template. Let me illustrate this; look at the following example which binds
Customer records to an accordion.
Listing 1
<ajax:Accordion id="accSingleData" runat="server">
<HeaderTemplate>
<asp:Label ID="lblLastName" runat="server" Text='<%# Eval("LastName") %>' />
</HeaderTemplate>
<ContentTemplate>
<asp:Label ID="lblFirstName" runat="server" Text='<%# Eval("FirstName") %>' />
</ContentTemplate>
</ajax:Accordion>
If you expect this example to group entries by last name, it
will not; rather, a pane is created for each customer, with the last name as
the header and the first name as the content. It is a one-to-one relationship.