自定义验证器清除ErrorMessage [英] Custom Validator clear ErrorMessage

查看:104
本文介绍了自定义验证器清除ErrorMessage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用自定义验证器作为日期.每当我选择任何错误的日期时,它都会给我ErrorMessage,但此错误消息不会在清除按钮的Click事件上清除.是自定义验证器的行为方式,还是我可以在代码中进行某些更改以实现此目的..
有人可以告诉我吗?

如何使用javascript编写代码以清除按钮单击事件时Validator的ErrorMessage?

I have used the custom validator for date. It gives me the ErrorMessage whenever I select any wrong date, but this error message does not clear out on Click event of clear button. Is it how the custom validator behaves or is there something that I can change in my code for this to happen..
can somebody please tell me?

How to write the code to clear the ErrorMessage of Validator on click event of button using javascript??

Thanks in advance.

推荐答案

如果您不需要验证清除按钮,请单击CausesValidation="false"清除按钮.

检查在客户端上启用或禁用ASP.Net验证侧面 [ ^ ]
If you don''t require to validate for clear button click then set CausesValidation="false" for clear button.

check Enable or Disable ASP.Net validation on client side[^]


这篇关于自定义验证器清除ErrorMessage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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