You are here:   Home
Register   |  Login

Captured Technology - Blog

Minimize

Using the ASP.Net Ajax Accordion

Feb 11

Written by:
2/11/2010 3:32 PM  RssIcon

Using the ASP.Net Ajax Accordion

It was suggested that we utilize the Ajax Accordion control in a recent project and although the software is easy to install finding decent documentation on a quick solution was not as simple. I did finally stumble upon a couple of examples and modified the code from them to come up with an easy way to implement an image based menu with the accordion style navigation.

The first thing to do is register the Ajax Control Kit in the page header.

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

Place the Script Manage on the page itself or on the Master Page.Placing the Script Manager on the Master Page worked well in our case as multiple pages used Ajax .

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>        

The main body of code contains the Accordion definition, a Panes area, an Accordion Pane definition, a Header, a Content area, and closing tags. The unique thing that we did was to place an asp image object within the header group instead of text. Our content area also contained a user control but the links of the menu could have been created directly on the page just as well.

    <ajaxToolkit:Accordion ID="Accordion1" runat="server" FadeTransitions="True" 
    SelectedIndex="0" TransitionDuration="100"  HeaderCssClass="accordionHeader" 
    ContentCssClass="accordionContent" AutoSize="None" ToolTip="Something">
    <Panes> 
    <ajaxToolkit:AccordionPane id="AccordionPane5" runat="server">
    <Header><asp:Image runat="server" AlternateText="Some Text" ImageUrl="~/Images/Menu1.png" />    
    </Header>
    <Content>
    ...
    ... Links to Menu items.
    ...
    </Content>
    </ajaxToolkit:AccordionPane>
    </Panes> 
    </ajaxToolkit:Accordion>

Tags:
Categories:

5 comment(s) so far...


Gravatar

Re: Using the ASP.Net Ajax Accordion

I did finally stumble upon a couple of examples and modified the code from them to come up with an easy way to implement an image based menu with the accordion style navigation.

By Dr Hanookai on   2/12/2010 10:21 AM
Gravatar

Re: Using the ASP.Net Ajax Accordion

thanks for the code.

By dhruwin on   2/27/2010 9:09 AM
Gravatar

canon inkjet cartridges

Thank you for all the great posts from last year! I look forward to reading your blog, because they are always full of information that I can put to use. Thank you again, and God bless you in 2010.

By canon inkjet cartridges on   3/8/2010 12:47 AM
Gravatar

Re: Using the ASP.Net Ajax Accordion

hello
my friends
i am using a Accordion AJAX Control in current project but when add a asp.net server control like gridview into content element of it ,i am facing with errors in code behind part ANYWHERE used gridview..
please guide me about this problem
thanks very much

By Venice Hotels on   7/22/2010 4:11 AM
Gravatar

Re: Using the ASP.Net Ajax Accordion

Just wanted to let you know that i've been looking for a solution similiar to this for a long long time (i'm assuming you had similar trouble). Thank you so much.

By Reverse Cell Phone Number Search on   12/7/2010 3:26 PM

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel 

FaceBook

Minimize

Mobile Version

Minimize
Add CapturedTech - Technology Mippin widget

Translate

Minimize

Sponsors

Minimize
AbeBooks.com &#8211; Textbooks

Recent Comments

Minimize
Re: Microsoft Test Bounties
I had spent a good deal of my time looking for someone to explain this subject clearly and I have really enjoyed reading your blog posts and I collected a lot of interesting things as well as I done a research on the subject and learn most peoples will agree with your blog.
Re: 10 Ways to Source Great Sales Leads
Hoovers.com, that have contact information for tens of millions of businesses. If necessary, you can work with these companies' research teams to order lists specifically tailored to your organization's sales needs.
Re: Microsoft Test Bounties
To find bugs and showing it to microsoft is quite admirable. Keep blogging more i will appreciate.
Re: Microsoft Test Bounties
Testing a software and giving out the errors to microsoft is amazing. Very good thing to do. One can do this in free time.
Re: Reindexing SQL Server Tables
Discussed about the SQL server and more interesting matter discussed in the post because in the post define about the SQL server table so that can be know that and able to understand regarding post.

u comment, i follow