RegularExpressionValidator启用/禁用问题 [英] RegularExpressionValidator enable/disable problem

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

问题描述

大家好,

我对验证器有一点问题.我正在简短地解释它;


我有一个密码更改页面和那里的RegularExpressionValidator来强制用户输入强密码(例如密码的长度.)用户更改密码后,页面显示有关密码更改的成功消息,并且有一个新按钮变为可见以继续其他步骤.但是,继续按钮不起作用,因为重新加载页面以从服务器获取成功消息,并且验证块继续按钮操作.单击按钮但无法正常工作后,我尝试"validator.enable = false".如果您能给我建议,我会受到赞赏的吗?



最好的问候,

Hi guys,

I have a little problem about validator. I am explaining it shortly;


I have a password change page and RegularExpressionValidator there to force user for a strong password (such as length of the password.) After user changed password, page shows a success message about password change and there is a new button becomes visible to continue other steps. But, the continue button doesn''t work because the page reloads to get success message from server and validations blocks continue button action. I tried to "validator.enable=false" after button clicked but not working. I will be appraciated if you can give me advice about it?



Best regards,

推荐答案

将此"继续"按钮的CausesValidation 属性设置为false.
Set the CausesValidation property of this "continue" button to false. that should do the trick.


1.如果您的继续按钮未进行其他验证,则将其CausesValidation属性设置为false.
2.如果您的继续按钮正在执行其他验证,则应使用validationgroup
http://msdn.microsoft.com/en-us/library/ms227424.aspx
验证组的简单Ex
1.If your continue button not doing some other validation then set its CausesValidation property to false.
2.If your continue button is doing some other validation then you should use validationgroup
http://msdn.microsoft.com/en-us/library/ms227424.aspx
Simple Ex of validation group


Set导致对新按钮的验证为错误

定义验证组
Set Causes validation false to new button
or
Define validation group


这篇关于RegularExpressionValidator启用/禁用问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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