JavaScript
  Home arrow JavaScript arrow Page 4 - The Accordion Component in the AJAX Contro...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

The Accordion Component in the AJAX Control Toolkit
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 12
    2007-03-20

    Table of Contents:
  • The Accordion Component in the AJAX Control Toolkit
  • The Accordion Component
  • Creating a web page displaying an Accordion
  • The design view of the Accordion
  • The page displayed on the browser

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    The Accordion Component in the AJAX Control Toolkit - The design view of the Accordion


    (Page 4 of 5 )

    The next picture shows the design view of the JAccordion.aspx page. The ScriptManager is the first item added. If you forget to add the ScriptManager and add the Accordion you will be presented with an error message.

    The Source Code Listing

    This is the complete listing of JAccordion.aspx page for the above design.

    <%@ Page Language="C#"
        AutoEventWireup="true"
        CodeFile="JAccordion.aspx.cs"
        Inherits="Accordion_JAccordion" %>

    <%@ Register Assembly="AjaxControlToolkit"
        Namespace="AjaxControlToolkit"
        TagPrefix="ajaxToolkit" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
      <title>Untitled Page</title>
    </head>
    <body>
      <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1"
          runat="server">
        </asp:ScriptManager>
        <ajaxToolkit:Accordion ID="Accordion1"
          runat="server" ContentCssClass="accordionContent"
          HeaderCssClass="accordionHeader"
          TransitionDuration="200"
          AutoSize="Fill"
          FadeTransitions="true"
          SelectedIndex="0" Height="300px" Width="500px"
          BorderWidth="1px" BorderColor="DarkOrange">

          <Panes>
            <ajaxToolkit:AccordionPane ID="AccordionPane1"
              runat="server" BackColor="Aquamarine" >
              <Header >Htek</Header>
              <Content>A thing of beauty is a joy for ever </Content>
            </ajaxToolkit:AccordionPane>
            <ajaxToolkit:AccordionPane ID="AccordionPane2"
              runat="server" BackColor="AliceBlue" >
              <Header>Hodentek</Header> 
              <Content><p><a href="http://hodentek.blogspot.com"> Jay's Hodentek Blog</a></p></Content> 
            </ajaxToolkit:AccordionPane>
            <ajaxToolkit:AccordionPane ID="AccordionPane3"
              runat="server" BackColor="AntiqueWhite" >
              <Header>ASP Free</Header>
              <Content><asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
              </Content> 
            </ajaxToolkit:AccordionPane> 
          </Panes> 
        </ajaxToolkit:Accordion>

      </form>

    </body>
    </html>

    More JavaScript Articles
    More By Jayaram Krishnaswamy


       · It does work well in IE 7.0, but there are some display problems in the other...
     

    JAVASCRIPT ARTICLES

    - Book Review: Learning the Yahoo! User Interf...
    - Dynamically Generate a Selection List in a R...
    - Intergrate DWR into Your Java Web Application
    - Detect Browser Compatibility with the Reques...
    - Using the EXT JS Date Picker Widget
    - Ajax Hack for Entering Information Without R...
    - EXT JS 2.1 Overview
    - Using the Style Object for Zebra Tables with...
    - Binary Searching
    - An Improved Approach to Building Zebra Tables
    - Assigning Background Colors Dynamically to Z...
    - Building Zebra Tables with CSS and JavaScript
    - JavaScript: Array Objects
    - A Closer Look at Smart Markers with Yahoo! M...
    - Using Polylines and Smart Markers with Yahoo...







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway