Ajax Control Toolkit Accordion not behaving in SharePoint 2007

Ajax Control Toolkit Accordion not behaving in SharePoint 2007


If like me you have tried to get the the Ajax Accordion control from the AJAX Control Toolkit (http://www.asp.net/(S(fu2l2uzphr2u3u45q2dnez55))/ajax/AjaxControlToolkit/Samples/) to work in SharePoint you may have failed or gave up.

I could get the accordion to display in my web part but clicking on another accordion pane would not close the current one and open the next, there was simply no animation of any kind.

After a lot of searching and fiddling around I found that there is a newer and slightly enhanced ScriptManager included with the Control Toolkit called the ToolkitScriptManager.

I removed the old <asp:ScriptManager> from my masterpage and added a new Register directive and ToolkitScriptManager and hey presto the Accordion control started to work!

Here is the code you will need:

<%@ Register TagPrefix="Toolkit" Assembly="AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" Namespace="AjaxControlToolkit" %>

Followed by the ToolkitScriptManager itself – <toolkit:ToolkitScriptManager ID=”tkScriptMan” runat=”server” />

Hope this helps!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">