public void DisAbled(Control page)
{
if (page.HasControls())
{
foreach (Control control in page.Controls)
{
if (control is TextBox)
{
(control as TextBox).Enabled = false;
}
else if (control is DropDownList)
{
(control as DropDownList).Enabled = false;
}
else if (control is RadioButton)
{
(control as RadioButton).Enabled = false;
}
else if (control is LinkButton)
{
(control as LinkButton).Enabled = false;
}
DisAbled(control);
}
}
}