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:
|
Bu hataya çözüm olarak Jquery kütüphanesini indirip, projemde bir klasör içine kaydettim.
Globl.ascx dosyası içersine
protected void Application_Start(object sender, EventArgs e)
{
ScriptManager.ScriptResourceMapping.AddDefinition("jquery", new ScriptResourceDefinition
{
Path = "~/js/jquery-1.8.1.min.js",
DebugPath = "~/js/jquery-1.8.1.min.js",
CdnPath = "~/js/jquery-1.8.1.min.js",
CdnDebugPath = "~/js/jquery-1.8.1.min.js"
});
}
kodlarını ekleyerek bu hatadan kurtulmuş oldum.
Veya
Webconfig içine bu kodları indirmeye gerek kalmadan.<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="none"/>
</appSettings>
kodlarını yazabilirsiniz
8 yorum:
teşekkürler, sıyırmak üzere idim... :)
çok teşekkür ederim :)
Hay ALLAH razı olsun. Çok makbule geçti.
Çok teşekkür ederim.
Ben 2. seçeneği uyguladım ve sorun çözüldü :)
Çoook sağolun yaa :D
yarına proje yetiştircem 2 saattir bir validationu eklemeye
uğraşıyorum Allah razı olsun nasıl dua etcem bilemezsiniz:))
Teşekkürler :)
teşekkürler kardesim kafayı yiyecektim
Yorum Gönder