绕过一个RequiredFieldValidator [英] Bypassing a requiredfieldvalidator

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

问题描述

我有有正常工作,当用户presses提交按钮就可以验证一个表单。但是,当用户presses注销按钮的验证器停止工作的按钮。

I have a webform which has validators on it that work well when the user presses the submit button. But when the user presses the logout button the validators stop that button from working.

任何建议,如何解决这个问题?

Any suggestions as to how remedy this?

推荐答案

您需要使用的CausesValidation 财产上的按钮。

You need to use the CausesValidation property on the button.

<asp:Button id="Button1" runat="server"
  Text="Cancel" CausesValidation="False">
</asp:Button>

这篇关于绕过一个RequiredFieldValidator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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