RequiredFieldValidator中的问题 [英] Problem in RequiredFieldValidator

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

问题描述





在我的应用程序中,我有两个按钮(提交和取消)

提交按钮验证并上传到数据库。

取消按钮将重定向到另一个页面。



我想要仅对提交按钮进行验证。

但是验证也发生在取消按钮上。



我不想这样做。请帮我实现。



提前致谢。

Hi,

In my application I have two buttons(submit and cancel)
Submit button validates and upload into database.
Cancel button will redirect to another page.

I want to achieve validation only for Submit button.
But validation is happening for cancel button also.

I dont want to do this. Please help me to achieve.

Thanks in advance.

推荐答案

在你的取消按钮(html部分) ),包括以下内容

In your Cancel button (html part), include the following
CausesValidation="False"


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

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