jQuery问题页面无法打开

时间:2017-11-17 01:01:02

标签: c# jquery asp.net sql-server

WebForms UnobtrusiveValidationMode需要“jquery”的ScriptResourceMapping。请添加名为jQuery的ScriptResourceMapping(区分大小写)。 描述:执行当前Web请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息:System.InvalidOperationException:WebForms UnobtrusiveValidationMode需要“jQuery”的ScriptResourceMapping。请添加一个名为jQuery的ScriptResourceMapping(区分大小写)。

来源错误:

在执行当前Web请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常的起源和位置的信息。 每次我试图进入页面时都会遇到同样的问题

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="change username.aspx.cs" Inherits="settings_change_username" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
   <title>Account Set|swapy</title>
    <link href="../css/MyStyle.css" rel="stylesheet" />
     <link rel="shortcut icon" type="icon/x-icon" href="../Logo/logof.png" />
</head>
<body style="background-image:url('../images/settings img/settings back.jpg');background-size:cover;color:goldenrod;font-size:larger">
    <form id="form1" runat="server">
    <center><h1>Account Settings</h1></center>
    <div style="background-color:#100f0f">
     <center>
        <asp:Table ID="Table1" runat="server">
          <asp:TableRow>
              <asp:TableCell><nav class="menu">
        <ul class="clearfix">
            <li>
                <a href="#" style="text-decoration:none;">Profile Settings</a>

                <ul class="sub-menu">
                    <li><a href="change username.aspx">Change User name</a></li>
                    <li><a href="change pass.aspx">Change password</a></li>
                    <li><a href="change email.aspx">Change Email</a></li>
                     <li><a href="change phone number.aspx">Change phone number</a></li>
                </ul>
            </li>
        </ul>
    </nav></asp:TableCell>
              <asp:TableCell><span class="set-manu"><a href="Dealete account.aspx">Delete Acount</a></span></asp:TableCell>
              <asp:TableCell><span class="set-manu"><a href="View Pro.aspx">View my profile Acount</a></span></asp:TableCell>
          </asp:TableRow>
      </asp:Table>
     </center>
    </div>
        <div id="Connected" runat="server" style="position:relative;margin-left:3%">
                <h2 style="color:red">Welcome <b><span id="Usernamec" runat="server" style="color:goldenrod"></span></b></h2><br />
            </div>
        <center><div id="change" style="position:relative" runat="server">
            <center>
            <br /><br /><asp:TextBox CssClass="txt" ID="txtuser" runat="server" placeholder="Enter New Username"></asp:TextBox>
            <span  style="color:red"><asp:RequiredFieldValidator ID="Rfvuser" runat="server" ErrorMessage="<img src='http://www.clker.com/cliparts/a/T/A/y/b/C/x-mark-hi.png' width='30px' height='30px'/>password is Required" ControlToValidate="txtuser"></asp:RequiredFieldValidator></span>
             <asp:TextBox CssClass="txt" ID="re" runat="server" placeholder="Repeat New Username"></asp:TextBox>
            <span  style="color:red"><asp:RequiredFieldValidator ID="RfvReuser" runat="server" ErrorMessage="<img src='http://www.clker.com/cliparts/a/T/A/y/b/C/x-mark-hi.png' width='30px' height='30px'/>Please Repeat password" ControlToValidate="re"></asp:RequiredFieldValidator>
            <br /><asp:CompareValidator ID="Cmuser" runat="server" ErrorMessage="<img src='http://www.clker.com/cliparts/a/T/A/y/b/C/x-mark-hi.png' width='30px' height='30px'/>The passwords dont mach" ControlToCompare="txtuser" ControlToValidate="re"></asp:CompareValidator>
                <asp:CustomValidator ID="CVPass" runat="server" ErrorMessage="<img src='http://www.clker.com/cliparts/a/T/A/y/b/C/x-mark-hi.png' width='30px' height='30px'/>The Password is taken" EnableClientScript="False" Display="Dynamic"></asp:CustomValidator>
            </span>
            <asp:Button ID="changeBtn" OnClick="changeBtn_Click" CssClass="login" runat="server" Text="Change"></asp:Button>
        </div>

            <div id="sure" visible="false" style="position:relative" runat="server">
                                <span style="color:red"><h2 >Are You Sure?</h2> that you want to change your username to: <span id="pa" runat="server"></span></span><br /><br />
                <asp:TextBox CssClass="txt" ID="Pvpass" runat="server" type="password" placeholder="Enter Password"></asp:TextBox></center>
              <span  style="color:red"><asp:RequiredFieldValidator ID="rfvpvpass" runat="server" ErrorMessage="<img src='http://www.clker.com/cliparts/a/T/A/y/b/C/x-mark-hi.png' width='30px' height='30px'/>Please Enter your previous password password" ControlToValidate="Pvpass"></asp:RequiredFieldValidator><asp:CustomValidator ID="CVcheck" runat="server" ErrorMessage="<img src='http://www.clker.com/cliparts/a/T/A/y/b/C/x-mark-hi.png' width='30px' height='30px'/>The Password is not your previous one" EnableClientScript="False" Display="Dynamic"></asp:CustomValidator></span>
               <br /><br /><br /> <asp:Button CssClass="login" ID="Button2" runat="server" Text="Change" OnClick="ins_Click" /><asp:Button CssClass="cencel" OnClick="button3_Click" ID="Button3" runat="server" Text="Cancel" />
           </div>
        </center>
           <a class="button" href="index.aspx">Home page</a> <a class="button" href="Account settings.aspx">Account Settings</a>
    </form>
</body></html>

0 个答案:

没有答案