Ramco Ramco

Ramco Ramco

  • 442
  • 3.4k
  • 516.6k

Error - Unhandled exception

Aug 28 2024 6:25 AM

Hi

  I am getting error when i use Regular Expression 

<div class="col-lg-6 col-md-6 col-sm-12">
    <div class="form-group">
        <label>Bank Name</label>&nbsp;<span style="color: red">*</span>
        <asp:TextBox ID="txtBankName" MinLength="2" MaxLength="50" class="form-control alpha" placeholder="Bank Name" required="true" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtBankName"
        ForeColor="Red" ValidationExpression="[a-zA-Z0-9\s]*$" ErrorMessage="Valid characters: Alphabets, Numbers and Space." />
    </div>
</div>

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).]
   System.Web.UI.ClientScriptManager.EnsureJqueryRegistered() +3886983
   System.Web.UI.WebControls.BaseValidator.RegisterUnobtrusiveScript() +14
   System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +11612054
   System.Web.UI.Control.PreRenderRecursiveInternal() +132
   System.Web.UI.Control.PreRenderRecursiveInternal() +227
   System.Web.UI.Control.PreRenderRecursiveInternal() +227
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3671

Thanks


Answers (2)