"CausesValidation = False";对于动态创建的按钮不起作用 [英] "CausesValidation=False" not working for dynamically created button

查看:155
本文介绍了"CausesValidation = False";对于动态创建的按钮不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在我的页面中,有一些必需的字段验证控件.这些必需的验证应仅触发某些按钮单击事件.要仅在某些必需的按钮单击事件中触发必需的字段验证器,请设置CausesValidation ="True",而对于其余按钮,请设置CausesValidations ="True".它的工作正常.但是问题是我的页面也有网格(HTML Table).在该网格中,有两个图像按钮可编辑和删除.这些图像按钮是根据数据库值动态创建的.但是我的要求是,在编辑和删除图像按钮单击事件中不应触发字段验证.即使为图像按钮设置了CausesValidation ="False",也需要引发问题字段验证.

Hi all,

In my page have some required field validation controls. these required validations should fire only some button click events. For firing required field validators only in some required button click events, set CausesValidation=''True'' and for remaining buttons set CausesValidations=''True''. Its working fine. But the problem is my page also have grid(HTML Table). In that grid have two image buttons edit and delete. These image buttons are created dynamically based on database values. But my requirement is required field validations should not fire in edit and delete image button click events. problem is required field validations are fired even though set CausesValidation=''False'' for image buttons.

推荐答案

Try By Setting buttons property "UseSubmitBehaviour=False"





BtnDisplay.UseSubmitBehaviour=False


这篇关于"CausesValidation = False";对于动态创建的按钮不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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