必填字段验证器-如何忽略 [英] Required Field Validator -- how to ignore

查看:96
本文介绍了必填字段验证器-如何忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在文本框中使用了日历扩展器,对于同一个文本框,我具有RequiredFieldValidator.我现在的要求是,当我单击一个按钮时,它应该忽略该文本框,该按钮上的文本框不需要该值,请单击

能否请你指教


谢谢

Hi
I have used a Calender Extender in a TextBox and for the same textbox i have RequiredFieldValidator.My requirement now is when i click on a button it should ignore the textbox ,value not required for the text box on that button click

could you please advice


Thanks

推荐答案


尝试将按钮原因验证"属性设置为false.
Hi,
try to set the button "cause validation" property to false. and if it did not work try to set a validation group for the button.


Ur应该把答案放到Setfocuserror = False上,不要使用Control来验证字段
Ur Answer should be put Setfocuserror=False don''t use Control to validate field


如果只希望禁用一个验证器,而使其他验证器处于活动状态,则保留按钮和验证组不变.在这种情况下,只需将要禁用的验证器的"Enabled"属性设置为false,就如同其他任何组件一样.
Leave the button and the validation group as they are if you only want one validator to be disabled while leaving the others active. In that case you can simply set the ''Enabled'' property of the validator you want to disable to false, as with any other component.


这篇关于必填字段验证器-如何忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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