双错误消息RegularExpressionValidator [英] double error message RegularExpressionValidator

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

问题描述

<table cellpadding="2" cellspacing="2" align="center">
<tr>
  <asp:ValidationSummary ID="Alert" runat="server" CssClass="failureNotification" HeaderText=""/>
</tr>

 <tr>
   <FTB:FreeTextBox id="FTB" runat="server"/>
  <asp:RegularExpressionValidator ID="rev" runat="server" ControlToValidate="FTB" ErrorMessage="Content cannot be empty." ValidationExpression="[^\s]+" CssClass="failureNotification"/>
 </tr>
</table>







当我让FreeTextBox为空时,RegularExpressionValidator的错误信息显示在2个位置

http://img856.imageshack.us/img856/1275/rxyq.png [这里]



帮助! !我只想在一个位置显示错误消息




When I let the FreeTextBox empty, Error message of RegularExpressionValidator shows in 2 positions
http://img856.imageshack.us/img856/1275/rxyq.png[here]

Help!! I just want to show Error Message in one position

推荐答案

你是否尝试使用RegularExpressionValidator的Display =None
Are u try using Display="None" of RegularExpressionValidator


然后尝试从asp.net页面删除验证摘要,它将为您汇总错误列表。
Then try to remove validation summary from asp.net page, it will summarize the error list for you.


这篇关于双错误消息RegularExpressionValidator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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