WebPartVerb.Enabled Property

Gets or sets a value that indicates whether a verb is enabled.

Namespace: System.Web.UI.WebControls.WebParts
Assembly: System.Web (in system.web.dll)

[ThemeableAttribute(false)] 
public:
virtual property bool Enabled {
	bool get ();
	void set (bool value);
}
/** @property */
public boolean get_Enabled ()

/** @property */
public void set_Enabled (boolean value)

public function get Enabled () : boolean

public function set Enabled (value : boolean)

Not applicable.

Property Value

true if the verb is enabled; otherwise, false. The default is true.

Use this property to get or set a value indicating whether the verb is enabled. It is useful to be able to enable or disable verbs at given points in the page and control life cycle. For example, if a developer wants to prevent users from being able to close the WebPart controls in a zone for any reason, the developer can set the Enabled property value on the CloseVerb verb to false, and then users will be prevented from closing any controls within that zone. By default, disabled verbs are rendered in verbs menus with a visual cue such as a lighter text color.

This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and Introduction to ASP.NET Themes.

The following code example shows how to override the Enabled property in a derived class inheriting from WebPartVerb. This source code shows only the portion of the code for the custom zone and the WebPartVerb class that overrides the property. The rest of the code required to run the example can be found in the Example section of the WebPartVerb class overview.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: