微軟的AJAX控制項學習一:AccordionDemo

來源:互聯網
上載者:User
這個控制項其實就和以前的Atlas和現在的Ajax的CollapsiblePanel這個控制項的作用差不多的,這兩個應用的場合有些不同:
 Accordion應用在存在多個Panel而且一次只顯示一個Panel 的時候;
CollapsiblePanel呢只能控制一個Panel的顯示和隱藏;
下面做一個Accordion的例子代碼: 1    <div>
 2        <div>
 3        在一個面板裡面連結顯示或隱藏我們想顯示和隱藏的
 4        </div>
 5        <br />
 6        <asp:ScriptManager ID="ScriptManager1" runat="server">
 7        </asp:ScriptManager>      
 8         <cc1:Accordion
 9            ID="MyAccordion" 
10            runat="server" SelectedIndex="0"   
11            FadeTransitions="true"             
12            FramesPerSecond="80"
13            TransitionDuration="80"
14            AutoSize="None" 
15            RequireOpenedPane="false" 
16            SuppressHeaderPostbacks="true">
17           <Panes>
18            <cc1:AccordionPane ID="AccordionPane1" runat="server">
19                <Header><a href="" class="accordionLink">·中國</a></Header>
20                <Content>
21                <div style="background-color:ThreeDShadow">
22                   中國我曉得<br />
23                   你呢?
24                </div></Content>
25            </cc1:AccordionPane>
26            <cc1:AccordionPane ID="AccordionPane2" runat="server">
27                <Header><a href="" class="accordionLink"><br/>美國</a></Header>
28                <Content>
29                  美國我討厭 
30                  <br />
31                  and you ?
32                </Content>
33            </cc1:AccordionPane>
34            <cc1:AccordionPane ID="AccordionPane3" runat="server">
35                <Header><a href="" class="accordionLink"><br />日本</a></Header>
36                <Content>
37                  日本我憎恨
38                  <br />
39                  Agree with me??
40                </Content>
41            </cc1:AccordionPane>
42            <cc1:AccordionPane ID="AccordionPane4" runat="server">
43                <Header><a href="" class="accordionLink"><br />韓國</a></Header>
44                <Content>
45                    我羨慕,美女帥哥太多打,呵呵
46        
47                </Content>
48            </cc1:AccordionPane>
49            </Panes>
50        </cc1:Accordion>
51        </div>

這樣啊,比較簡單啊,主要就是Accordion的幾個屬性的設定 ,有些觀點都是我個人的見解哦,有什麼不對之處還請更正,TKS~~~~~~

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.