ASP.Net 2012不显眼的验证与jQuery

编程入门 行业动态 更新时间:2024-10-28 04:21:39
本文介绍了ASP.Net 2012不显眼的验证与jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我是用Visual Studio 2012中玩,我创建了一个空ASP.Net Web应用程序后,当我试图给的传统的验证程序控件的添加到新的页面,在此发生错误:

  

的WebForms UnobtrusiveValidationMode需要'jQuery的'一ScriptResourceMapping。请添加一个名为ScriptResourceMapping的jQuery(区分大小写)。

什么是解决它的步骤是什么?

这是我的网页标记:

< ASP:面板=服务器ID =pnlUsernameGroupingText =用户名设置>    < D​​IV>        < ASP:标签ID =usernameLabel文本=请输入您的用户名=服务器AssociatedControlID =用户名/>    < / DIV>    < D​​IV>        < ASP:文本框=服务器ID =用户名/>        < ASP:的RequiredFieldValidator的ErrorMessage =用户名要求的ControlToValidate =用户名=服务器文本= - 要求/>    < / DIV>< / ASP:面板>

解决方案

好像有很多关于ValidationSettings不正确的信息:UnobtrusiveValidationMode值。要停用它,你需要做到以下几点。

<添加键=ValidationSettings:UnobtrusiveValidationModeVALUE =无/>

字无,不WebForms的应该用于禁用此功能。

I was playing with Visual Studio 2012 and I created an empty ASP.Net Web Application, when I tried to add the traditional validator controls to a new page, this error occurs:

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

What are the steps to fix it?

This is my page markup:

<asp:Panel runat="server" ID="pnlUsername" GroupingText="Username settings"> <div> <asp:Label ID="usernameLabel" Text="Please enter your username" runat="server" AssociatedControlID="username" /> </div> <div> <asp:TextBox runat="server" ID="username" /> <asp:RequiredFieldValidator ErrorMessage="The username is required" ControlToValidate="username" runat="server" Text=" - Required" /> </div> </asp:Panel>

解决方案

It seems like there is a lot of incorrect information about the ValidationSettings:UnobtrusiveValidationMode value. To Disable it you need to do the following.

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

The word None, not WebForms should be used to disable this feature.

更多推荐

ASP.Net 2012不显眼的验证与jQuery

本文发布于:2023-06-04 22:10:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/506095.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:显眼   Net   ASP   jQuery

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!