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 .
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.
"Accordion1" runat="server" FadeTransitions="True"
SelectedIndex="0" TransitionDuration="100" HeaderCssClass="accordionHeader"
ContentCssClass="accordionContent" AutoSize="None" ToolTip="Something">
"server" AlternateText="Some Text" ImageUrl="~/Images/Menu1.png" />
... Links to Menu items.