locked
AjaxControlToolkit RRS feed

  • Question

  • User29267012 posted

    Hi,

    I'm newbie in AjaxControlToolkit.

    I'm using Visual Studio 2013, ans Install AjaxControlToolkit via nuget.

    I'm trying to do a collapsible panel.

    I've tried a lot af example, but no example work!!!!

    My first question is:

    - What is the difference between "ScriptManager" and "ToolScriptManager"?

    I have my ScriptManager  my master page, is it a problem?

    I've tried example for newbie, but it still does'nt work, I don't saw what's the problem....

    Is there an issue installing by nuget?

    I don't understand and seem to be very bad....

    If anyone could help me, I'll be so happy!!

    Thanks...

    PS: I've tried with collapsible panel examples...

    Sunday, January 25, 2015 4:14 PM

Answers

  • User2103319870 posted

    FrenchDevGirl

    I have my ScriptManager  my master page, is it a problem?

    You need to replace the scriptmanager with ToolkitscriptManager. Change the asp script manager to ToolKitScriptmanager and  set the CombineScripts property to false.

    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" ScriptMode="Release"
                CombineScripts="false">
            </asp:ToolkitScriptManager>

    Complete Code:

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <style type="text/css">
            .Header {
                color: white;
                background-color: Black;
            }
    
            .Content {
                background-color: green;
            }
        </style>
    
    </head>
    <body>
        <form id="form1" runat="server">
            <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" ScriptMode="Release"
                CombineScripts="false">
            </asp:ToolkitScriptManager>
            <div>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:Panel ID="HeaderPanel" runat="server" CssClass="Header">
                            <asp:Label ID="lblText" runat="server" />
                        </asp:Panel>
                        <asp:Panel ID="ContentPanel" runat="server" CssClass="Content">
                            This is a test content in Collapisible Panel Extender
                        </asp:Panel>
    
                        <asp:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server" TargetControlID="ContentPanel" CollapseControlID="HeaderPanel" ExpandControlID="HeaderPanel"
                            Collapsed="true" TextLabelID="lblText" CollapsedText="Expand" ExpandedText="Collapse"
                            CollapsedSize="0">
                        </asp:CollapsiblePanelExtender>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
        </form>
    </body>
    </html>
    

    Rendered Demo

    Source URL

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 25, 2015 4:27 PM
  • User-271186128 posted

    Hi FrenchDevGirl,<!--?xml:namespace prefix = "o" ns = "urn:schemas-microsoft-com:office:office" /--><o:p></o:p>

    Welcome to ASP.NET forum,<o:p></o:p>

    As for this issue, as A2H said, you should use <ajaxToolkit:ToolkitScriptManager> when you use ajax control tookit.<o:p></o:p>

    For the difference between AjaxScriptManager and ScriptManager, you could refer to the following articles.<o:p></o:p>

    http://blogs.msdn.com/delay/archive/2007/06/11/script-combining-made-easy-overview-of-the-ajax-control-toolkit-s-toolkitscriptmanager.aspx

    http://blog.turlov.com/2008/05/scriptmanager-vs-toolkitscriptmanager.html

    Best Regards,
    Dillion

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 26, 2015 5:09 AM

All replies

  • User2103319870 posted

    FrenchDevGirl

    I have my ScriptManager  my master page, is it a problem?

    You need to replace the scriptmanager with ToolkitscriptManager. Change the asp script manager to ToolKitScriptmanager and  set the CombineScripts property to false.

    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" ScriptMode="Release"
                CombineScripts="false">
            </asp:ToolkitScriptManager>

    Complete Code:

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <style type="text/css">
            .Header {
                color: white;
                background-color: Black;
            }
    
            .Content {
                background-color: green;
            }
        </style>
    
    </head>
    <body>
        <form id="form1" runat="server">
            <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" ScriptMode="Release"
                CombineScripts="false">
            </asp:ToolkitScriptManager>
            <div>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:Panel ID="HeaderPanel" runat="server" CssClass="Header">
                            <asp:Label ID="lblText" runat="server" />
                        </asp:Panel>
                        <asp:Panel ID="ContentPanel" runat="server" CssClass="Content">
                            This is a test content in Collapisible Panel Extender
                        </asp:Panel>
    
                        <asp:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server" TargetControlID="ContentPanel" CollapseControlID="HeaderPanel" ExpandControlID="HeaderPanel"
                            Collapsed="true" TextLabelID="lblText" CollapsedText="Expand" ExpandedText="Collapse"
                            CollapsedSize="0">
                        </asp:CollapsiblePanelExtender>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
        </form>
    </body>
    </html>
    

    Rendered Demo

    Source URL

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 25, 2015 4:27 PM
  • User-271186128 posted

    Hi FrenchDevGirl,<!--?xml:namespace prefix = "o" ns = "urn:schemas-microsoft-com:office:office" /--><o:p></o:p>

    Welcome to ASP.NET forum,<o:p></o:p>

    As for this issue, as A2H said, you should use <ajaxToolkit:ToolkitScriptManager> when you use ajax control tookit.<o:p></o:p>

    For the difference between AjaxScriptManager and ScriptManager, you could refer to the following articles.<o:p></o:p>

    http://blogs.msdn.com/delay/archive/2007/06/11/script-combining-made-easy-overview-of-the-ajax-control-toolkit-s-toolkitscriptmanager.aspx

    http://blog.turlov.com/2008/05/scriptmanager-vs-toolkitscriptmanager.html

    Best Regards,
    Dillion

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 26, 2015 5:09 AM