编程语言
首页 > 编程语言> > c# – 如何将AjaxControlToolkit添加到Visual Studio 2013 Web表单模板中?

c# – 如何将AjaxControlToolkit添加到Visual Studio 2013 Web表单模板中?

作者:互联网

它已经复杂了,我怀疑我是否可以单独处理它.目前,从一开始就包含很多项目,我不确定它们是什么以及它们是什么.

我已经将AjaxControlToolkit添加到项目中并用于设置脚本管理器:

    <ajaxToolkit:ToolkitScriptManager runat="server"
        EnablePageMethods="true"
        EnablePartialRendering="true"
        LoadScriptsBeforeUI="true"
        AjaxFrameworkMode="Enabled">
        <Scripts>

            <asp:ScriptReference Name="jquery" />
            <asp:ScriptReference Name="bootstrap" />

            <asp:ScriptReference Name="MsAjaxBundle" />
            <asp:ScriptReference Name="respond" />
            <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
            <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
            <asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
            <asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
            <asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
            <asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
            <asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
            <asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
            <asp:ScriptReference Name="WebFormsBundle" />


        </Scripts>
    </ajaxToolkit:ToolkitScriptManager>

它看起来像ajaxToolkit已经有效,但我看到Chrome控制台中的错误.

但我看到的第一个错误是:

Uncaught Error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts.
Ensure the correct version of the scripts are referenced. If you are
using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in
AjaxControlToolkit.dll. ScriptResource.axd:19

我在Scripts文件夹中找到了很多不同的各种脚本,没有提供AjaxControlToolkit,现在我无法理解如何解决它?

解决方法:

检查此链接可能会有所帮助:

AjaxControlToolkit version 7.0123 with .NET 4.5

Microsoft JScript runtime error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts.

标签:c,ajax,asp-net,asp-net-ajax,ajaxcontroltoolkit
来源: https://codeday.me/bug/20190708/1407281.html