如何通过单击链接按钮禁用所需的字段验证器? [英] How to disable the required field validator by clicking a link button?

查看:65
本文介绍了如何通过单击链接按钮禁用所需的字段验证器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个页面的2个面板中有两个表单。一个是登录,另一个是注册。注册表单面板在加载页面不可见,但登录页面面板可见。我给了2个链接按钮来切换两个面板。要进入注册表单面板,我已经给出了一个名为还不是会员的链接按钮。当我单击此链接按钮时,登录页面中的文本框显示所需的字段验证器并阻止我转到注册面板。如何通过单击链接按钮禁用所需的字段验证器?



我尝试过:



我在一个页面的2个面板中有两个表单。一个是登录,另一个是注册。注册表单面板在加载页面不可见,但登录页面面板可见。我给了2个链接按钮来切换两个面板。要进入注册表单面板,我已经给出了一个名为还不是会员的链接按钮。当我单击此链接按钮时,登录页面中的文本框显示所需的字段验证器并阻止我转到注册面板。如何通过单击链接按钮禁用所需的字段验证器?

解决方案

查看使用验证组,您始终可以将链接按钮上的CausesValidation属性设置为false

I have two forms in 2 panels in one page. One is login and other is register. The panel of register form is not visible at the loading page, but the panel of login page is visible. I have given 2 link button to switch both the panels. To enter into the registration form panel, I have given a link button called 'Not a member yet'. When I click this link button, the text boxes in the login page shows the required field validator and blocks me to go to the registration panel. how can i disable the required field validator by clicking a link button?

What I have tried:

I have two forms in 2 panels in one page. One is login and other is register. The panel of register form is not visible at the loading page, but the panel of login page is visible. I have given 2 link button to switch both the panels. To enter into the registration form panel, I have given a link button called 'Not a member yet'. When I click this link button, the text boxes in the login page shows the required field validator and blocks me to go to the registration panel. how can i disable the required field validator by clicking a link button?

解决方案

Look at using Validation Groups and you can always set the CausesValidation property on your link button to false.


这篇关于如何通过单击链接按钮禁用所需的字段验证器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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