I am using user controls to display some content on a asp.net page.And I need to disable(not invisible) a user control on the page depending on some conditions.
Instead of disabling each control inside the user control separately,is it possible to disable the user control itself?
I read some posts which mentioned of a property ‘Enabled’ for a user control.But I do not see that property for the user control in the intellisense.
Please could someone help me with this?
Thanks.
Edit:
Instead of disabling the user control is it possible to set it to read only, as the user control values are not posted back if it is disabled? Sorry about the confusion.
You could place all the seperate controls in a Panel inside the User control and then just disable that panel.
Then just add a method or property in the User Control that hides the disabling(i.e. disabling the panel) from the web page.