如何使用asp.net中的验证组来验证用户控件 [英] how to validate user control using validation group in asp.net

查看:76
本文介绍了如何使用asp.net中的验证组来验证用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用asp.net中的验证组来验证用户控件.
用户控件是在数据列表控件内部使用的,这就是为什么我无法在用户控件上应用验证.如果您有任何解决方案,请给我.
谢谢

How to validate user control using validation group in asp.net.
User control is use inside datalist control thats why i dont able to apply validation on user control.If you have any solution then please give me.
Thanks

推荐答案



您正在使用哪种类型的用户控件.以及该用户控件中使用了哪些控件

验证意味着我们可以检查属性值及其正确的范围.

在这种情况下,请使用javascript验证(如果您知道该用户控件中使用的webcontrol).

否则我们将无法验证usercontrol.

您要在同一组中关联的所有Best
Hi,

What type of user control you are using .And What controls used in that user control

validation means we can check property values and their range right.

In this case use javascript validations If you know webcontrol which is used in that usercontrol.

otherwise we can not validate usercontrol.

All the Best


控件只需要设置
使用
the controls which you want to associate in same group just only require to set
use
Validation Group property of the controls


解决问题的控件使用相同的验证组名称...


same Validation Group name for the controls your problem has been solved...


这篇关于如何使用asp.net中的验证组来验证用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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