AjaxControlToolkit中不使用母版页的工作中不、工作、母版、AjaxControlToolkit

2023-09-10 18:31:16 作者:independence(独立)

我一直在试图让AjaxControlToolkit中7.0607的版本(从下载的NuGet)工作为使用一个母版,没有运气Web表单。 运行DOTNET的4.5 该母版有它ToolkitScriptManager,但它不下来传递给子页面。

我可以创建一个独立的aspx页面,落一个ScriptManager在页面上和控制工作得很好,所以我的数字有遗漏的设置。

是什么使这项工作的程序?

母版脚本块是像这样:

 < ajaxToolkit:ToolkitScriptManager ID =ToolkitScriptManager1=服务器>
        <脚本>
            < ASP:的ScriptReference大会=AjaxControlToolkit中NAME =ExtenderBase.BaseScripts.js/>
            < ASP:的ScriptReference大会=AjaxControlToolkit中NAME =Common.Common.js/>
            < ASP:的ScriptReference名称=jQuery的/>
            < ASP:的ScriptReference名称=jquery.ui.combined/>
            < ASP:的ScriptReference名称=WebForms.js路径=〜/脚本/的WebForms / WebForms.js/>
            < ASP:的ScriptReference名称=WebUIValidation.js路径=〜/脚本/的WebForms / WebUIValidation.js/>
            < ASP:的ScriptReference名称=MenuStandards.js路径=〜/脚本/的WebForms / MenuStandards.js/>
            < ASP:的ScriptReference名称=GridView.js路径=〜/脚本/的WebForms / GridView.js/>
            < ASP:的ScriptReference名称=DetailsView.js路径=〜/脚本/的WebForms / DetailsView.js/>
            < ASP:的ScriptReference名称=TreeView.js路径=〜/脚本/的WebForms / TreeView.js/>
            < ASP:的ScriptReference名称=WebParts.js路径=〜/脚本/的WebForms / WebParts.js/>
            < ASP:的ScriptReference名称=Focus.js路径=〜/脚本/的WebForms / Focus.js/>
            < ASP:的ScriptReference名称=WebFormsBundle/>
        < /脚本>
    < / ajaxToolkit:ToolkitScriptManager>
 

解决方案

没有错误,从另一个论坛只是糟糕的建议。 下面的几行是罪魁祸首 - 任何一个食堂的东西:

 < ASP:的ScriptReference大会=AjaxControlToolkit中NAME =ExtenderBase.BaseScripts.js/>
< ASP:的ScriptReference大会=AjaxControlToolkit中NAME =Common.Common.js/>
 
C 使用母版

I've been trying to get the AjaxControlToolkit (downloaded from NuGet) version 7.0607 to work for web forms that use a masterpage with no luck. Running DotNet 4.5 The MasterPage has the ToolkitScriptManager on it, but it does not pass down to child pages.

I can create a standalone aspx page, drop a scriptmanager on the page and the controls work just fine, so I figure there is a setting missing.

What is the procedure for making this work?

The masterpage script block is as so:

<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="AjaxControlToolkit" Name="ExtenderBase.BaseScripts.js" />
            <asp:ScriptReference Assembly="AjaxControlToolkit" Name="Common.Common.js" />
            <asp:ScriptReference Name="jquery" />
            <asp:ScriptReference Name="jquery.ui.combined" />
            <asp:ScriptReference Name="WebForms.js" Path="~/Scripts/WebForms/WebForms.js" />
            <asp:ScriptReference Name="WebUIValidation.js" Path="~/Scripts/WebForms/WebUIValidation.js" />
            <asp:ScriptReference Name="MenuStandards.js" Path="~/Scripts/WebForms/MenuStandards.js" />
            <asp:ScriptReference Name="GridView.js" Path="~/Scripts/WebForms/GridView.js" />
            <asp:ScriptReference Name="DetailsView.js" Path="~/Scripts/WebForms/DetailsView.js" />
            <asp:ScriptReference Name="TreeView.js" Path="~/Scripts/WebForms/TreeView.js" />
            <asp:ScriptReference Name="WebParts.js" Path="~/Scripts/WebForms/WebParts.js" />
            <asp:ScriptReference Name="Focus.js" Path="~/Scripts/WebForms/Focus.js" />
            <asp:ScriptReference Name="WebFormsBundle" />
        </Scripts>
    </ajaxToolkit:ToolkitScriptManager>

解决方案

no bug, just bad advice from another forum. The following lines were the culprit - either one messes up things:

<asp:ScriptReference Assembly="AjaxControlToolkit" Name="ExtenderBase.BaseScripts.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit" Name="Common.Common.js" />