目录
报错如图:
报错详情:
WebForms UnobtrusiveValidationMode 需要“jquery”ScriptResourceMapping。请添加一个名为 jquery (区分大小写)的 ScriptResourceMapping。
说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.InvalidOperationException: WebForms UnobtrusiveValidationMode 需要“jquery”ScriptResourceMapping。请添加一个名为 jquery (区分大小写)的 ScriptResourceMapping。
源错误:
执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。
堆栈跟踪:
[InvalidOperationException: WebForms UnobtrusiveValidationMode 需要“jquery”ScriptResourceMapping。请添加一个名为 jquery (区分大小写)的 ScriptResourceMapping。]
System.Web.UI.ClientScriptManager.EnsureJqueryRegistered() +3001316
System.Web.UI.WebControls.BaseValidator.RegisterUnobtrusiveScript() +12
System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +9805683
System.Web.UI.Control.PreRenderRecursiveInternal() +90
System.Web.UI.Control.PreRenderRecursiveInternal() +163
System.Web.UI.Control.PreRenderRecursiveInternal() +163
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +906
版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.8.4330.0
register.aspx页面代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="register.aspx.cs" Inherits="VehicleWarehouseManagementSystem.register" %>
<!DOCTYPE html>
<html lang="ch">
<head>
<meta charset="UTF-8">
<title>用户注册</title>
<style>
* {
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
body {
background-image: url('../img/bg.jpg');
padding-top: 25px;
}
.re_div {
border: 8px solid #EEEEEE;
width: 800px;
height: 300px;
background-color: white;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.cLeft {
float: left;
margin: 15px;
}
#p1 {
color: rgba(255,106,.8);
font-size: 20px;
}
#p2 {
color: #A6A6A6;
font-size: 20px;
}
.cCenter {
float: left;
}
.td_left {
width: 100px;
height: 50px;
text-align: right;
color: #A6A6A6;
}
.td_right {
padding-left: 50px;
color: #A6A6A6;
}
#tbusername, #passwordRe, #tbID, #tbpassword, #email, #name, #tel, #birthday, #checkcode {
width: 251px;
height: 32px;
border: 1px solid #A6A6A6;
/* 设置边框圆角*/
border-radius: 10px;
padding-left: 10px;
}
#checkcode {
width: 110px;
}
#cheImg {
height: 32px;
vertical-align: middle;
}
#btn_sub {
width: 150px;
height: 40px;
background-color: rgba(255,106,.8);
border: 1px solid #FFD026;
}
.cRight {
font-size: 15px;
margin: 15px;
float: right;
}
.cRight p a {
color: rgba(255,106,.8);
}
</style>
</head>