How to make eachcontrol inside update panel to readonly.
private static void DisableControl(System.Web.UI.Control control)
{
System.Reflection.PropertyInfo enProp = control.GetType().GetProperty("Enabled");
if (enProp != null)
{
enProp.SetValue(control, false, null);
}
foreach (System.Web.UI.Control ctrl in control.Controls)
{
DisableControl(ctrl);
}
}
-------------------------------------------------
//Calling
DisableControl(update panel id);
{
System.Reflection.PropertyInfo enProp = control.GetType().GetProperty("Enabled");
if (enProp != null)
{
enProp.SetValue(control, false, null);
}
foreach (System.Web.UI.Control ctrl in control.Controls)
{
DisableControl(ctrl);
}
}
-------------------------------------------------
//Calling
DisableControl(update panel id);
Comments
Post a Comment