我是用Visual Studio 2012中玩,我创建了一个空ASP.Net Web应用程序后,当我试图给的传统的验证程序控件的添加到新的页面,在此发生错误:
的WebForms UnobtrusiveValidationMode需要'jQuery的'一ScriptResourceMapping。请添加一个名为ScriptResourceMapping的jQuery(区分大小写)。
什么是解决它的步骤是什么?
这是我的网页标记:
< ASP:面板=服务器ID =pnlUsernameGroupingText =用户名设置> < DIV> < ASP:标签ID =usernameLabel文本=请输入您的用户名=服务器AssociatedControlID =用户名/> < / DIV> < DIV> < 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
发布评论