开发者

Disabling controls on a nested user control

开发者 https://www.devze.com 2023-01-08 20:56 出处:网络
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 cl开发者_开发知识库osed I want to Disable all the controls on Accounts

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 cl开发者_开发知识库osed I want to Disable all the controls on Accounts page ( including parent and child userControl – controls collection). How do I do this? Thanks


Wrap the section with an Panel control. Then set panel.Enabled = false;. This will trickle down and disable its children too.

HTH.

0

精彩评论

暂无评论...
验证码 换一张
取 消