AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

ToolControlBase..::..EnableControls Method

Recursively enables or disables all child WebControls within the specified parent control.

Namespace:  AdvantageCMS.Core.Admin.BaseClasses
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


protected void EnableControls(
	bool enabled,
	Control thisControl
)

Parameters

enabled
Type: Boolean
If true, enables all child controls; if false, disables them.
thisControl
Type: Control
The parent control whose children will be enabled or disabled.

Examples


Call from within a tool control to lock or unlock a panel of form fields.
C#
// Disable all controls in the details panel when viewing a published version
EnableControls(false, pnlDetails);

// Re-enable controls when switching back to the draft tab
EnableControls(true, pnlDetails);