Accordion 控制項預設狀態設定為全關閉狀態 :
將 AJAX Control Toolkit Accordion 控制項預設狀態設定為全關閉狀態 :
1: <cc1:Accordion ID="MyAccordion" runat="Server" SelectedIndex="-1"
2: HeaderCssClass="accordionHeader" RequireOpenedPane="false"
3: SuppressHeaderPostbacks="true">
4: <Panes>
5: <cc1:AccordionPane>
6: <Header>標題一</Header>
7: <Content>11111111111</Content>
8: </cc1:AccordionPane>
9: </Panes>
10: <Panes>
11: <cc1:AccordionPane>
12: <Header>標題2</Header>
13: <Content>2222222222</Content>
14: </cc1:AccordionPane>
15: </Panes>
16: </cc1:Accordion>
重要在於 RequireOpenedPane="false" (是否必需打開Pane) 與 SelectedIndex="-1" (預設 Pane 的 index) 設定