gpt4 book ai didi

asp.net - 我不断收到 "' MsAjaxBundle' 不是有效的脚本名称。该名称必须以 '.js' 结尾。 “在尝试构建我的项目时

转载 作者:行者123 更新时间:2023-12-02 17:06:13 26 4
gpt4 key购买 nike

在构建我帮助开发的网站时,我不断收到上述错误,我不确定为什么,下面我将向您展示我的母版页的代码以及实际页面的代码。这个错误是最近才出现的,我不太清楚为什么。

    <%@ 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>

上面是母版页,下面将是页面级代码。

    <%@ 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”并单击“卸载”。

  2. 右键单击您的项目,管理 NuGet 包,转到“已安装”包”,找到“Microsoft.AspNet.ScriptManager.MSAjax”并单击“卸载”。

  3. 右键单击您的项目,选择“管理 NuGet 包”,然后转到“在线”,找到“Microsoft.AspNet.ScriptManager.MSAjax”并单击“安装”。

关于asp.net - 我不断收到 "' MsAjaxBundle' 不是有效的脚本名称。该名称必须以 '.js' 结尾。 “在尝试构建我的项目时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37698114/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com