动态绑定Accordion
Accordion在适当的场合使用,还是比较酷的!
下面的例子是展示如何动态绑定Accordion.
aspx
1
<ajaxToolkit:Accordion ID="Accordion_I" runat="server" HeaderCssClass="accordionHeader"
2
ContentCssClass="accordionContent" AutoSize="None">
3
<Panes>
4
</Panes>
5
<HeaderTemplate>
6
<%# Eval("Key") %>
7
</HeaderTemplate>
8
<ContentTemplate>
9
<%# Eval("Value") %>
10
</ContentTemplate>
11
</ajaxToolkit:Accordion>
![](/Images/OutliningIndicators/None.gif)
2
![](/Images/OutliningIndicators/None.gif)
3
![](/Images/OutliningIndicators/None.gif)
4
![](/Images/OutliningIndicators/None.gif)
5
![](/Images/OutliningIndicators/None.gif)
6
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
7
![](/Images/OutliningIndicators/None.gif)
8
![](/Images/OutliningIndicators/None.gif)
9
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
10
![](/Images/OutliningIndicators/None.gif)
11
![](/Images/OutliningIndicators/None.gif)
头模板和内容模板设置绑定。
cs
后台绑定也很简单
假如要重数据库取得一个数据集进行绑定。
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
搞掂。