在嵌套的用户控制禁用控制 [英] Disabling controls on a nested user control
本文介绍了在嵌套的用户控制禁用控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是母版。在一个账户页面我对这个用户控件UserControl的我有一个更多的用户控件。如果帐户被关闭我想禁用所有的帐户页面控件(包括家长和孩子用户控件 - 控件集合)。
我该怎么做呢?
谢谢
I am using a masterpage. On a accounts page I have a Usercontrol on this UserControl I have one more user control. If Account is closed I want to Disable all the controls on Accounts page ( including parent and child userControl – controls collection). How do I do this? Thanks
推荐答案
包裹用面板控制的部分。然后设置panel.Enabled = FALSE ;.这将涓滴太禁止它的孩子。
Wrap the section with an Panel control. Then set panel.Enabled = false;. This will trickle down and disable its children too.
心连心。
这篇关于在嵌套的用户控制禁用控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文