错误:WebForms UnobtrusiveValidationMode需要ScriptResourceMapping [英] Error : WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping

查看:59
本文介绍了错误:WebForms UnobtrusiveValidationMode需要ScriptResourceMapping的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在执行以下代码时正在设计Web应用程序

我得到的错误消息是

I am Designing web application when I was Executing the below code
Error Message I am getting is

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



任何人都可以建议如何解决这个问题背后的代码...

提前谢谢!!!


can anyone please suggest how to solve and what would be the code behind for this...
Thanks in advance!!!

推荐答案

您好


请将以下行放在web.config文件的'appsetting'标签内



Hi
Please place the following line inside the 'appsetting' tag of the web.config file

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







谢谢




Thanks


嗯。除了阅读错误信息之外我们还没有其他建议。

它告诉你为了使用UnobtrusiveValidationMode你需要做什么。



因此要么检查你的命名,要么查看你添加的与不显眼的验证模式相关的代码,并与文档进行比较。



我们可以'为你做任何事情 - 我们无法看到你的屏幕,访问你的硬盘或读你的想法......
Um. There really isn;t much we can suggest except "read the error message".
It tells you what you need to do in order to use "UnobtrusiveValidationMode".

So either check your naming, or look at the code you added related to unobtrusive validation mode and compare with the documentation.

We can't do any of that for you - we can't see your screen, access your HDD, or read your mind...


这个错误发生在框架4.5上,这里ASP.NET使用来自客户端验证逻辑的添加脚本引用的HTML5数据属性和后期绑定JavaScript,因此要避免此错误,您需要将 UnobtrusiveValidationMode 设置为在web.config中,在web.config中添加以下标记以解决它

This error occurred on framework 4.5, here ASP.NET uses HTML5 data-attributes and late bound JavaScript from an added script reference for client-side validation logic, so to avoid this error you need to set 'UnobtrusiveValidationMode' to 'none' in web.config, add below tag in web.config to resolve it
<appSettings>
      <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
 </appSettings>


这篇关于错误:WebForms UnobtrusiveValidationMode需要ScriptResourceMapping的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆