.Net

[Solved]WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).

[Solved]WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive). , someone asked me to explain?

I am using validation controls in asp.net application, I got this following webforms unobtrusivevalidationmode error while running the application. 

 “WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).”

webforms unobtrusivevalidationmode

Aspx Codes(Html ):

<form id="form1" runat="server">
        <div>
            <table align="center"  style="border: 1px solid #dbcece">
                <tr>
                    <td colspan="3"
                        style="text-align: center; font-weight: 700; border-bottom-style: solid;
border-bottom-width: thin; border-bottom-color: #008080;">User Login Area</td>
                </tr>
                <tr>
                    <td >&nbsp;</td>
                    <td >&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td >UserName :</td>
                    <td >
                        <asp:TextBox ID="txtusername" runat="server" Width="120px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                            ControlToValidate="txtusername" ErrorMessage="Please, enter username"

                           ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td >Password :</td>
                    <td >
                        <asp:TextBox ID="txtpassword" runat="server" TextMode="Password" Width="120px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                            ControlToValidate="txtpassword" ErrorMessage="Please, enter password"
                            ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td >&nbsp;</td>
                    <td >
                        <asp:Button ID="btnlogin" runat="server" OnClick="btnlogin_Click"
                            Text="Login" />
                    </td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td >&nbsp;</td>
                    <td colspan="2">
                        <asp:Label ID="lblmsg" runat="server"></asp:Label>
                    </td>
                </tr>
            </table>
        </div>
    </form>

Solution: Here, I am using asp validation on the design page,so that we need to enable the validation mode in the web.config file. Add key and value in the appsetting like this,

  <appSettings>
   <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
  </appSettings> 

If you set an unobtrusiveValidation mode to none(default), the asp.net application will use the pre 4.5 behavior for client side validation. If you set the key value to web forms, the application will use the HTML5 attributes for client side validation.

Post your comments / questions