SIGN UP MEMBER LOGIN:    
ARTICLE

Accordion pane control in .Net

Posted by Jitendra Sampathirao Articles | AJAX in C# November 17, 2010
Here I am describing about how to use Accordionpane.
Reader Level:
Download Files:
 

The Accordion control represents a series of panes that can be viewed one at a time. So this is so useful where the content publishing place is small.

These are the Key Properties:

HeaderCssClass:
Name of the CSS class to use for the headers. This can be either applied to the Accordion as a default for all AccordionPanes, or an individual AccordionPane.

HeaderSelectedCssClass:
Name of the CSS class to use for the selected header. This can be either applied to the Accordion as a default for all AccordionPanes, or an individual AccordionPane.

ContentCssClass:
Name of the CSS class to use for the content. This can be either applied to the Accordion as a default for all AccordionPanes, or an individual AccordionPane.

FadeTransitions:
True to use the fading transition effect, false for standard transitions.

TransitionDuration:
Number of milliseconds to animate the transitions

HeaderTemplate:
The Header template contains the markup that should be used for an pane's header when data binding.

ContentTemplate:
The Content template contains the markup that should be used for a pane's content when data binding.

Here I'm explaining tell you about AccordionPane control.

  1. Drag and drop the ToolkitScriptManager and Accordion controls from Ajax Toolkit.
  2. Drag and drop the AccordianPane control between pane tags.
  3. Add these properties to Accordion control.
    • CssClass,
    • HeaderCssClass,
    • HeaderSelectedCssClass,
    • ContentCssClass

This is the Style sheet I used:

<style type="text/css">

        .accordionpane {

            width300px;

        }       

        .accrdHeader {

            border1px solid #2F4F4F;

            colorwhite;

            background-color#006B54;

            font-familyArial, Sans-Serif;

            font-size12px;

            font-weightbold;

            padding5px;

            margin-top5px;

            cursorpointer;

        }       

        .accrdHeaderSelected {

            border1px solid #CBEBFA;

            colorwhite;

            background-color#9D6B84;

            font-familyArial, Sans-Serif;

            font-size12px;

            font-weightbold;

            padding5px;

            margin-top5px;

            cursorpointer;

        }       

        .accrdContent {

            background-color#F5DEB3;

            border1px #CBEBFA;

            border-topnone;

            padding5px;

            padding-top10px;

        }

</style>

This is the Accordin pane stuff:

<asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server">

</asp:ToolkitScriptManager>  

<asp:Accordion ID="Accordion2"  CssClass="accordionpane" HeaderCssClass="accrdHeader" 

HeaderSelectedCssClass="accrdHeaderSelected"ContentCssClass="accrdContent" runat="server">

<Panes>

<asp:AccordionPane ID="AccordionPane3" runat="server">

<Header>About Myself</Header>

<Content>

I am Jitendra.SampathiRao. I'm basically from Vishakapatnam. I completed my B.Tech(Computer Science) from JNT University.

I'm presently working in a vizag baseb software company from last two years.

</Content>

</asp:AccordionPane>

<asp:AccordionPane ID="AccordionPane4" runat="server">

<Header>Technical Skill set</Header>

<Content>

<b>My Technical Skill set is:</b><br />Asp.Net, <br />C#.Net, <br />VB.Net, <br />WCF, <br />WPF, <br />Silverlight,<br />Sql

 Server, <br />Mysql,<br /> AJAX, <br /> JQuery.

</Content>

</asp:AccordionPane>

<asp:AccordionPane ID="AccordionPane5" runat="server">

<Header>Hobbies</Header>

<Content>

Playing Cricket,<br />Watching movies, <br /> Net surfing.

</Content>

</asp:AccordionPane>

</Panes>

</asp:Accordion>  

Note: Source Code is available at download links.

The final result should be like:

accrd.bmp

I hope you like this article.

Login to add your contents and source code to this article
share this article :
post comment
 

for beginers its very helpful...thank u... can u pls explain me on IIS..in simple

Posted by Pramod tc Jan 05, 2011

Thanks dude..........

Posted by Jitendra Sampathirao Nov 30, 2010

Ssttuuppiidd ffeellooww ttoottaallyy wwaassttee 

Posted by purushothaman ppn Nov 30, 2010
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
Become a Sponsor