You must Sign In to post a response.
  • Category: ASP.NET

    Required Field Validator Problem


    I am using RequiredFieldValidator in my code.

    <asp:TextBox ID="txtMobileNo" Width="321px" BorderColor="Black" runat="server"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtMobileNo" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>

    but i got following error at runtime

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

    I am also put following code in webconfig file
    <appSettings> <add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/> </appSettings>
    but not change.
  • #761705


    I too don't know the exact problem but after I search in Google, I found the possibilities of this error and how to overcome this.

    Please Go through this link, and refer no 33 post.

    Hope this will helpful to you...

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #761707
    You can try to add the script manager.

    <asp:ScriptManager ID="ScriptManager1" runat="server" />

    By Nathan
    Direction is important than speed

  • #761712
    Hello Gaurav,

    Add ScriptManager :

    <asp:ScriptManager ID="ScriptManager1" runat="server" />

    Add Validation Group to Required Field Validator like this :

    <asp:TextBox ID="TextBoxName" runat="server" CssClass="auto-style3" CausesValidation="True"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBoxName" ErrorMessage="Please enter your name" ForeColor="Red" SetFocusOnError="True" ValidationGroup="SubmitInfo"></asp:RequiredFieldValidator>

    <asp:Button ID="ButtonSubmit" runat="server" Text="Submit" ValidationGroup="SubmitInfo" OnClick="ButtonSubmit_Click" BorderColor="#669999" BorderStyle="Outset" BorderWidth="2px" Font-Bold="True" Font-Names="Century Gothic"/>

    Hope this will help you.

    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"

  • #761741

    Why you have added this line in web.config.
    <add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>

    Are you validating using only validation control or you are using any javascript or jquery in your code.


    Sridhar Thota.
    If you learn't from defeat..
    You haven't really lost..

    Sridhar Thota.
    Editor: DNS Forum.

  • #761752
    try adding the below code in Global.asax file in the Application_Start event handler. Replace the version of the jquery used in your project in the below statement. Then Restart your application.

    ScriptManager.ScriptResourceMapping.AddDefinition("jquery", new ScriptResourceDefinition {

    Path = "~/scripts/jquery-1.4.1.min.js",

    DebugPath = "~/scripts/jquery-1.4.1.js",

    CdnPath = "",

    CdnDebugPath = ""


    Miss. Jain
    Microsoft Certified Technology Specialist in .Net

Sign In to post your comments