Feb
11
Written by:
Steve Patterson
2/11/2010 3:32 PM
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>
4 comment(s) so far...
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
|
Re: Using the ASP.Net Ajax Accordion
thanks for the code.
By dhruwin on
2/27/2010 9:09 AM
|
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
|
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
|