How to make collapsable panel in datalist using Ajax?


The Code for this functionality is given below

<asp:DataList ID=”DatalistFNO” runat=”Server”>
<ItemTemplate>
<table>
<tr>
<td width=”400px” style=”background-color: #FFCACA;”>
<asp:Panel ID=”description_HeaderPanel” runat=”server” style=”cursor: pointer;” >
<div>
<font style=”font-family:Arial, Helvetica, sans-serif; font-size:12px”>&nbsp;<b><%# Eval(“FAQ_Question”)%></b></font>
</div>
</asp:Panel>
</td>
</tr>
<tr>
<td>
<asp:Panel id=”description_ContentPanel” runat=”server” style=”overflow:hidden;”>
<p>
<%#Eval(“FAQ_Answer”)%>
</p>
</asp:Panel>

<cc1:CollapsiblePanelExtender ID=”cpeDescription” runat=”Server”
TargetControlID=”description_ContentPanel”
ExpandControlID=”description_HeaderPanel”
CollapseControlID=”description_HeaderPanel”
Collapsed=”true” SuppressPostBack=”true” />

</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>

Advertisements