PDA

View Full Version : سوال: مشکل با RequiredFieldValidator در visual Studio 2013



mustafaehsani
یک شنبه 18 خرداد 1393, 21:20 عصر
با سلام
من وقتی در وب فرمم از RequiredFieldValidator در visual Studio 2013 استفاده میکنم eror زیر میده



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.EnsureJqueryRegi stered() +2280722
System.Web.UI.WebControls.BaseValidator.RegisterUn obtrusiveScript() +10
System.Web.UI.WebControls.BaseValidator.OnPreRende r(EventArgs e) +9640517
System.Web.UI.Control.PreRenderRecursiveInternal() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
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.34009


جالبه که قبلاً با رفتن به property page و فعال کردن accessibility validation و با زدن تیک دو آیتم ریز اون مشکل حل میشد اما در کمال تعجب دیگه جواب نمیده

mustafaehsani
یک شنبه 18 خرداد 1393, 21:22 عصر
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.EnsureJqueryRegi stered() +2280722
System.Web.UI.WebControls.BaseValidator.RegisterUn obtrusiveScript() +10
System.Web.UI.WebControls.BaseValidator.OnPreRende r(EventArgs e) +9640517
System.Web.UI.Control.PreRenderRecursiveInternal() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
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.34009

mustafaehsani
یک شنبه 18 خرداد 1393, 22:32 عصر
دوستان خودم با سرچ در منابع زبان اصلی یافتم با اضافه کردن کد ریز در Web.config حل میشه


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

<system.web>

</system.web>
</configuration>

aroshanzamir
یک شنبه 18 خرداد 1393, 22:54 عصر
سلام دوست خوب من :

شما در 3 جا می تونی این اعلان را داشته باشی
1- Web Config
2-Codebehind
3-Global
دستورش هم :


this.UnobtrusiveValidationMode = System.Web.UI.UnobtrusiveValidationMode.None;

mustafaehsani
دوشنبه 19 خرداد 1393, 00:10 صبح
سلام دوست خوب من :

شما در 3 جا می تونی این اعلان را داشته باشی
1- Web Config
2-Codebehind
3-Global
دستورش هم :


this.UnobtrusiveValidationMode = System.Web.UI.UnobtrusiveValidationMode.None;



راه حل منم درسته دیگه؟؟؟؟؟؟؟؟؟؟؟؟/ یه جورایی همونه دیگه نه؟؟؟؟؟؟؟؟؟؟؟؟

alireza.zahani
دوشنبه 19 خرداد 1393, 01:31 صبح
امنیت پایین نمیاد؟

mohammadbm2
سه شنبه 14 بهمن 1393, 22:10 عصر
سلام
برو داخل فایل web.config و 4.5 را به 4.0 تغییر بده