我必须添加的CausesValidation ="假"每一个ASP键使用,为什么? [英] i must add CausesValidation="False" to every ASP Button to work, why?
问题描述
您好,我有一个大的ASP页,我必须在此每个ASP按钮设置:
Hello i have a Big ASP Page and i must set in every ASP Button this:
CausesValidation="False"
工作。如果没有它不能运行codebehind功能。
to work. If don't it cant run a codebehind function.
有人可以给我解释一下为什么会这样?
can somebody explain to me why this is so?
推荐答案
看来你使用的是在你的页面验证控件。您的网页必须回发到服务器之前通过验证。下面是CausesValidation属性的功能:
It seems you are using Validation controls in your page. Your page must pass the validation before postback to server. Below is the functionality of CausesValidation property:
-
CausesValidation属性指定如果一个网页进行验证时,
Button控件被点击。
The CausesValidation property specifies if a page is validated when a Button control is clicked.
当按钮被点击默认执行页面验证。
Page validation is performed when a button is clicked by default.
此属性主要用于prevent验证时,取消或复位按钮被点击。
This property is mostly used to prevent validation when a cancel or reset button is clicked.
来源:<一个href=\"http://www.w3schools.com/aspnet/prop_webcontrol_button_causesvalidation.asp\">http://www.w3schools.com/aspnet/prop_webcontrol_button_causesvalidation.asp
这篇关于我必须添加的CausesValidation =&QUOT;假&QUOT;每一个ASP键使用,为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!