E
elaine
Hi,
I have a usercontrol which contains multiple server controls like
textbox, radiobutton..., I have a public field in the usercontrol
"Enabled". What i want to do is when the usercontrol's "Enabled" is
set to false, set all its child controls "Enabled" to false. I know i
can set them one by one. But there should be a easy way to do it
like :
for(int i=0;i<myUserControl.Controls.Count;i++)
{
control oControl = (control) myUserControl.Controls(i);
oControl.Enabled = false;
}
Anyone can give me a hint?
Elaine
I have a usercontrol which contains multiple server controls like
textbox, radiobutton..., I have a public field in the usercontrol
"Enabled". What i want to do is when the usercontrol's "Enabled" is
set to false, set all its child controls "Enabled" to false. I know i
can set them one by one. But there should be a easy way to do it
like :
for(int i=0;i<myUserControl.Controls.Count;i++)
{
control oControl = (control) myUserControl.Controls(i);
oControl.Enabled = false;
}
Anyone can give me a hint?
Elaine