Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET Ajax
.accordion {
           width: 400px;
       }
 
       .accordionHeader {
           border: 1px solid #2F4F4F;
           color: white;
           background-color: #2E4d7B;
           font-family: Arial, Sans-Serif;
           font-size: 12px;
           font-weight: bold;
           padding: 5px;
           margin-top: 5px;
           cursor: pointer;
       }
 
       .accordionHeaderSelected {
           border: 1px solid #2F4F4F;
           color: white;
           background-color: #5078B3;
           font-family: Arial, Sans-Serif;
           font-size: 12px;
           font-weight: bold;
           padding: 5px;
           margin-top: 5px;
           cursor: pointer;
       }
 
       .accordionContent {
           background-color: #D3DEEF;
           border: 1px dashed #2F4F4F;
           border-top: none;
           padding: 5px;
           padding-top: 10px;
       }
 
<asp:Accordion   
    ID="Accordion1"   
    CssClass="accordion"  
    HeaderCssClass="accordionHeader"  
    HeaderSelectedCssClass="accordionHeaderSelected"  
    ContentCssClass="accordionContent"   
    runat="server">  
<panes>  
    <asp:AccordionPane ID="AccordionPane1" runat="server">  
        <Header>Employee</Header>  
        <content>  
     
         ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.  
        Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus.  
        Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci.              
        </content>  
      
    <asp:AccordionPane ID="AccordionPane2" runat="server">  
        <Header>Pane 2</Header>  
        <content>  
        Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.  
        Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus.  
        Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci.  
        </content>  
      
    <asp:AccordionPane ID="AccordionPane3" runat="server">  
        <Header>Pane 3</Header>  
        <content>  
        Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.  
        Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus.  
        Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci.  
        </content>  
      
</panes>  
Posted 22-Dec-12 7:17am
Comments
Sandeep Mewara at 22-Dec-12 12:19pm
   
Your question is not too clear. You post Accordian HMTL... and what are you expecting back?
Salman Farooqui at 22-Dec-12 12:21pm
   
I Was trying Accordion I tried this on my aspx page but when clicking on header
Nothing is happening that is one pane should close other should open.this is not hapening what am i missing
Surendra0x2 at 22-Dec-12 12:22pm
   
Did you attach Script manager?
Salman Farooqui at 22-Dec-12 12:23pm
   
I have used Script manager in master page
Surendra0x2 at 22-Dec-12 12:27pm
   
u using accordion control on child page?
Salman Farooqui at 22-Dec-12 12:28pm
   
Yes I am using it in a Form Which Opens in Master Page

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Try to format your desired result using this simple example-
 
http://www.aspdotnet-suresh.com/2011/04/ajax-accordion-control-example-or-how.html[^]
May be u facing this isse
check these links-
 

[^]
 
http://www.dotnetspark.com/links/43900-accordion-control-masterpage-does-not-remember.aspx[^]
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 22 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100