用户控件上的Asp.net验证控件 [英] Asp.net Validation Control on User Controls

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

问题描述

嗨!
我在所有页面上都使用了一些texboxes和下拉菜单作为usercontrol.我想对这些应用asp.net验证控件.我怎样才能做到这一点?因为当我提供ControlToValidate =(usercontrol的id)时,它是不允许的.请指导我.
在此先感谢

Hi!
I have some texboxes and dropdown as usercontrol which i use on all pages. I want to apply asp.net validation controls on these. How can i do that? Because when i provide ControlToValidate =(id of the usercontrol) it does not allow. Please guide me.
Thanks in advance

推荐答案

我提供了ControlToValidate =(usercontrol的ID),这是不允许的.
您必须一次提供特定的控件,而不是一次提供整个UC.如果有帮助,将验证控件放在UC本身中.
i provide ControlToValidate =(id of the usercontrol) it does not allow.
You have to provide specific controls instead of entire UC at a time. Put the validation control in the UC itself if that helps.


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

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