Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i got problem like this when i use database or server validation control in visual studio 2012 please solve my problem

Server Error in '/' Application.
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() +2170706
   System.Web.UI.WebControls.BaseValidator.RegisterUnobtrusiveScript() +10
   System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +9576593
   System.Web.UI.Control.PreRenderRecursiveInternal() +83
   System.Web.UI.Control.PreRenderRecursiveInternal() +168
   System.Web.UI.Control.PreRenderRecursiveInternal() +168
   System.Web.UI.Control.PreRenderRecursiveInternal() +168
   System.Web.UI.Control.PreRenderRecursiveInternal() +168
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929 


thanks
Posted
Updated 25-Jan-15 19:13pm
v2

Add this to the Web Config

XML
<appSettings>
    <add key="ValidationSettings:UnobtrusiveValidationMode" value="WebForms" />
</appSettings>
 
Share this answer
 
Comments
UDTWS 26-Jan-15 2:02am    
Thanks for reply but still i got this error message...
Server Error in '/' Application.
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() +2170706
System.Web.UI.WebControls.BaseValidator.RegisterUnobtrusiveScript() +10
System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +9576593
System.Web.UI.Control.PreRenderRecursiveInternal() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
Kochathu Thomas Tinu 26-Jan-15 2:17am    
send me the design source
UDTWS 26-Jan-15 7:40am    
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Security.Cryptography;
using System.Text;
using System.Configuration;
using System.Data;

public partial class admin_Default : System.Web.UI.Page
{
// string conStr = ConfigurationManager.ConnectionStrings("WebConn").ConnectionString;
SqlConnection conStr = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);

protected void Page_Load(object sender, EventArgs e)
{

}
public bool validation()
{
bool functionReturnValue = false;
if ((txtUserNm.Text.Trim().ToString()).Length <= 3 | (txtUserNm.Text.Trim().ToString()).Length > 10)
{
ltrlMsg.Text = "Enter correct Login ID";
var _with1 = txtUserNm;
if (_with1.Enabled & _with1.Visible)
_with1.Focus();
return false;
return functionReturnValue;
}
else if ((txtPassword.Text.Trim().ToString()).Length <= 3 | (txtPassword.Text.Trim().ToString()).Length > 10)
{
ltrlMsg.Text = "Enter correct Password";
var _with2 = txtPassword;
if (_with2.Enabled & _with2.Visible)
_with2.Focus();
return false;
//return functionReturnValue;
}
return true;
//return functionReturnValue;
}

public void infobox(string message)
{
string NewScript = null;
NewScript = "<script language=JavaScript>";
NewScript = NewScript + "alert('" + message + "');";
NewScript = NewScript + "</script" + ">";
if ((!ClientScript.IsClientScriptBlockRegistered("alert"))) {
ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", NewScript);
}
}
private string md5(string sPassword)
{
System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
byte[] bs = System.Text.Encoding.UTF8.GetBytes(sPassword);
bs = x.ComputeHash(bs);
System.Text.StringBuilder s = new System.Text.StringBuilder();
foreach (byte b in bs)
{
s.Append(b.ToString("x2").ToLower());
}
return s.ToString();
}
protected void btnLogin_Click(object sender, EventArgs e)
{
if (validation() == true)
{
SqlCommand cmd = new SqlCommand();
string sql = "Select * from tblMN_Login where mnLoginId='" + txtUserNm.Text.Trim() + "'";
string pswd = null;
conStr.Open();
cmd.Connection = conStr;
cmd.CommandText = sql;
cmd.CommandType=System.Data.CommandType.Text;
SqlDataReader dr = cmd.ExecuteReader();

if (dr.Read())
{
pswd=dr["mnPassword"].ToString();
if (pswd == md5(txtPassword.Text) )
{
ltrlMsg.Text = "";
Random rnd = new Random();
Session["authorise"] = rnd.Next(1000, 9999);
Session["LogId"] = txtUserNm.Text.Trim();
Session["UsrType"] = null;
if (Convert.ToInt32(dr["USER_TYPE"])== 11) {
Session["UsrType"] = 11;
Response.Redirect("SupLogin.aspx");
} else if (Convert.ToInt32(dr["USER_TYPE"]) == 27) {
Session["UsrType"] = 27;
Response.Redirect("MN_Login.aspx");
}
} else {
ltrlMsg.Text = "Wrong Password";
txtPassword.Focus();
}
} else {
ltrlMsg.Text = "Wrong Login ID";
txtUserNm.Focus();
}
if (conStr.State==System.Data.ConnectionState.Open)
conStr.Close();
}

}
}
thanks to every one i solve problem
using this
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None">
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900