tags:

views:

25

answers:

1

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

+1  A: 

Hello,

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

HTH.

Brian
Is there way If I can disable form on a master page to achieve same thing?
I don't know about the form element; you can try, but you can also try to put a panel just inside the form so that it wraps everything, and add a property in the master page that changes the enabled property, which you can call in your code via this.Master (cast to the correct type though).
Brian
I added panel == thanks