我不断收到“'MsAjaxBundle'不是有效的脚本名称.名称必须以".js"结尾."在尝试建立我的项目时 [英] i keep getting "'MsAjaxBundle' is not a valid script name. The name must end in '.js'. " while trying to build my project

查看:69
本文介绍了我不断收到“'MsAjaxBundle'不是有效的脚本名称.名称必须以".js"结尾."在尝试建立我的项目时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在建立自己的网站以帮助开发时,我总是遇到上述错误,并且不确定为什么,下面我将向您显示我的母版页代码以及实际页面的代码.这个错误是最近才出现的,我不确定为什么.

when building my website that im helping develop I keep getting the above error and im not sure why, below I will show you the code for my master page as well as the code for the actual page. this error is fairly recently come up and im not really sure why.

    <%@ Master Language="VB" AutoEventWireup="false" CodeBehind="Carers.master.vb" Inherits="FosterTrack.Carers" %>

<!DOCTYPE html> 

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="~/Content/bootstrap.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>



    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"/>


</head>
<body>
<form runat="server">
    <asp:ScriptManager runat="server">
    <Scripts>
        <%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=301884 --%>
        <%--Framework Scripts--%>
        <asp:ScriptReference Name="MsAjaxBundle" />
        <asp:ScriptReference Name="jquery" />
        <asp:ScriptReference Name="bootstrap" />
        <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" />
        <%--Site Scripts--%>
    </Scripts>
</asp:ScriptManager>



        <a class="navbar-brand" href="#">FosterTrack V2</a>

            <div class="navbar navbar-inverse navbar-fixed-top">
            <nav class="navbar navbar-default" role="navigation">

                <div class="navbar-header">
                    <button  class="navbar-toggle" type="button" data-target=".navbar-collapse" data-toggle="collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div>


                <div class="navbar-collapse collapse fullscreen-navbar-collapse">
                    <asp:LoginView ID="HomeLV" runat="server">
                        <RoleGroups>
                            <asp:RoleGroup Roles="Masters, Foster Carers ">
                                <ContentTemplate>
                                    <div id="MainMenu10">
                                        <div class="list-group panel">
                                            <a class="list-group-item list-group-item-success" href="../../../../default.aspx" data-parent="#MainMenu10"> Home  </a>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </asp:RoleGroup>
                        </RoleGroups>
                    </asp:LoginView>
                    </div>
                </nav>
            </div>





        <div class="container body-content">
            <asp:ContentPlaceHolder ID="MainContent" runat="server">
            </asp:ContentPlaceHolder>
            <hr />
            <footer>
                <p>&copy; <%: DateTime.Now.Year %> - Compass Community Ltd</p>
            </footer>
        </div>
    </form>
</body>
</html> 

上面是下面的母版页,它将是页面级代码.

Above is the master page below is going to be page level code.

    <%@ Page Title="Home" Language="vb" AutoEventWireup="false" MasterPageFile="~/Carers_Area/Carers.Master" CodeBehind="Carers_Home.aspx.vb" Inherits="FosterTrack.Carers_Home" %>

<%@ Register TagPrefix="UC3" TagName="Drafts" Src="~/Service/Widgets/Carers/Carer_Drafts.ascx" %><asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <br/>   

        <div class="navbar navbar-inverse navbar-fixed-top">
            <nav class="navbar navbar-default" role="navigation">

                <div class="navbar-header">
                    <button  class="navbar-toggle" type="button" data-target=".navbar-collapse" data-toggle="collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div>


                <div class="navbar-collapse collapse fullscreen-navbar-collapse">
                    <asp:LoginView ID="HomeLV" runat="server">
                        <RoleGroups>
                            <asp:RoleGroup Roles="Masters, Foster Carers ">
                                <ContentTemplate>
                                    <div id="MainMenu10">
                                        <div class="list-group panel">
                                            <a class="list-group-item list-group-item-success" href="../../../../default.aspx" data-parent="#MainMenu10"> Home  </a>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </asp:RoleGroup>
                        </RoleGroups>
                    </asp:LoginView>
                    </div>
                </nav>
            </div>

    <h1>Home</h1>







      <asp:WebPartManager ID="WebPartManager1" runat="server">
    </asp:WebPartManager>
    <asp:CatalogZone ID="CatalogZone1" runat="server" CloseVerb-Enabled="False">
        <ZoneTemplate>
            <asp:DeclarativeCatalogPart ID="DeclarativeCatalogPart1" runat="server" Title="Home Page">
                <WebPartsTemplate>
                </WebPartsTemplate>
            </asp:DeclarativeCatalogPart>
        </ZoneTemplate>
        <CloseVerb Enabled="False"></CloseVerb>
        <HeaderCloseVerb Enabled="False" Visible="False" />
    </asp:CatalogZone>


   <div class="col-sm-12">
    <a href="Records/Recordings/New/New_Carer_Recording.aspx">
    <img src="../Images/CreateNewRecording-Button.png" height="75" width="300"/></a>
     <a href="Training/Events_Signup.aspx">
    <img src="../Images/ViewTraining-Button.png" height="75" width="300" /></a>
    </div>



    <asp:Label ID="WarningLbl" runat="server" CssClass="warning" Text=""></asp:Label>
    <div class="col-sm-12">
    <asp:WebPartZone ID="WebPartZonea" runat="server" BorderColor="White" BorderStyle="None"
            BorderWidth="0px" Padding="0" PartChromePadding="" ShowTitleIcons="False" PartChromeType="None">
        <ZoneTemplate>
            <UC3:Drafts ID="Drafts2" runat="server" title=" " />
        </ZoneTemplate>
        <CloseVerb Visible="False" />
        <MinimizeVerb Visible="false" />
    </asp:WebPartZone>
    </div>
    <br />




</asp:Content>

推荐答案

  1. 右键单击您的项目,管理NuGet软件包,转到已安装软件包",找到"Ajax Control Toolkit",然后单击卸载".

  1. Right-click your project, Manage NuGet Packages, goto "Installed packages", find "Ajax Control Toolkit" and click "Uninstall".

右键单击您的项目,管理NuGet软件包,转到已安装包"中,找到"Microsoft.AspNet.ScriptManager.MSAjax",然后单击卸载".

Right-click your project, Manage NuGet Packages, goto "Installed packages", find "Microsoft.AspNet.ScriptManager.MSAjax" and click "Uninstall".

这篇关于我不断收到“'MsAjaxBundle'不是有效的脚本名称.名称必须以".js"结尾.&quot;在尝试建立我的项目时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆