public void ControlStatus(Control control, bool isDisable)
{
foreach (Control c in control.Controls)
if (c.HasControls())
ControlStatus(c, isDisable);
else
{
WebControl wc = c as WebControl;
if (wc != null)
wc.Enabled = !isDisable;
}
}
Ignoring exceptions is bad programming practice.
Use '
as
' to avoid casting
c
twice.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.