WebPartVerb.Enabled Property
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)
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 ASP.NET Themes and Skins Overview.
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.
Windows 98, Windows 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.