locked
ASP.Net 4.5 AJAX Control Toolkit Accordion Not Working RRS feed

  • Question

  • User-596225964 posted

    Dear DotNet Dudes

    I cannot get the accordion control to work.

    The control appears on my screen with the first pane open, but clicking on headers does not open other panes.

    I've spent some time on this and I can't find anything on Google.

    I'm sure I've missed something obvious.

    Here's my mark-up:

    <%@ Page Title="" Language="C#" MasterPageFile="~/Styles/Main.Master" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="Pembs1.Pages.Test" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server">
    <div id="PageContent">
        <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager>
        <ajaxToolkit:Accordion ID="accTest" runat="server" TransitionDuration="150">
            <Panes>
                <ajaxToolkit:AccordionPane runat="server" ID="apnTest1">
                    <Header>
                        Test Head 1
                    </Header>
                    <Content>
                        Test Content 1
                    </Content>
                </ajaxToolkit:AccordionPane>
                <ajaxToolkit:AccordionPane runat="server" ID="apnTest2">
                    <Header>
                        Test Head 2
                    </Header>
                    <Content>
                        Test Content 2
                    </Content>
                </ajaxToolkit:AccordionPane>
            </Panes>
        </ajaxToolkit:Accordion>

    </div>
    </asp:Content>

    Any help is greatly appreciated.

    Many thanks

    Jubbs

    Wednesday, March 25, 2015 12:17 PM

Answers

  • User1918509225 posted

    Hi Jubbs,

    Thanks for your post here.

    Please make sure that youcheck if you MasterPage aslo contain ScriptManager,make sure that  just have one ToolkitScriptManager in your page.

    Second, I suggest that you could try to press F12 to check if it has any javascript error .

    Last ,please refer to the tutorial in the link below:

    http://aspdotnet-learning.blogspot.com/2013/09/explain-how-to-use-ajax-accordion-panel.html

    Best Regards,

    Kevin Shen.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 25, 2015 9:54 PM
  • User-596225964 posted

    Hi Kev

    Thanks for your reply.

    There was no toolscriptmanager duplication but when I tried F12 as you suggested it did show me an error message about Ajax Control Toolkit (ACT) requiring Ajax 4 scripts. Not really knowing how to resolve this I just uninstalled ACT from my project and manually installed the newest version of ACT (V15.1).  It seems to be working fine now.

    As an FYI for anyone else with similar problems, the version of ACT installed via the NuGet GUI was the one that caused problems.

    I would recommend manually installing the latest version of ACT from the ACT website (DevExpress).

    Kind regards

    Jubbs

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 26, 2015 5:24 AM

All replies

  • User1918509225 posted

    Hi Jubbs,

    Thanks for your post here.

    Please make sure that youcheck if you MasterPage aslo contain ScriptManager,make sure that  just have one ToolkitScriptManager in your page.

    Second, I suggest that you could try to press F12 to check if it has any javascript error .

    Last ,please refer to the tutorial in the link below:

    http://aspdotnet-learning.blogspot.com/2013/09/explain-how-to-use-ajax-accordion-panel.html

    Best Regards,

    Kevin Shen.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 25, 2015 9:54 PM
  • User-596225964 posted

    Hi Kev

    Thanks for your reply.

    There was no toolscriptmanager duplication but when I tried F12 as you suggested it did show me an error message about Ajax Control Toolkit (ACT) requiring Ajax 4 scripts. Not really knowing how to resolve this I just uninstalled ACT from my project and manually installed the newest version of ACT (V15.1).  It seems to be working fine now.

    As an FYI for anyone else with similar problems, the version of ACT installed via the NuGet GUI was the one that caused problems.

    I would recommend manually installing the latest version of ACT from the ACT website (DevExpress).

    Kind regards

    Jubbs

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 26, 2015 5:24 AM