System.Web 2.0.0.0 System.Object System.Web.UI.IStateManager System.ComponentModel.TypeConverter("System.Web.UI.WebControls.WebParts.WebPartVerbConverter, System.Web")

Web Parts verbs are interactive UI elements, typically represented by buttons or hyperlinks, that appear in pages that use Web Parts controls. Users click verbs to carry out common UI actions for Web Parts controls, such as closing a control or closing the edit display mode (a special page view associated with the control). All standard verbs provided with the Web Parts control set are associated with either a Web Parts zone (, , , or ) or a Web Parts control (, , , or ).

When the standard verbs are associated with a zone, their actions apply at the zone level, and the verbs usually appear in the zone's header or footer area. The following table lists the common zone-level verbs and describes their actions.

Zone-level verb

Action

Close verb

Used with zones that inherit from the class. Hides the UI for a zone and typically returns the page to its normal browse mode view.

Apply verb

Used with zones that inherit from the class. Applies changes that a user has made.

OK verb

Used with zones that inherit from the class. Has the combined effect of the apply and close verbs; it applies changes and hides the zone's UI.

Cancel verb

Used with zones that inherit from the class. Cancels any pending changes a user has made.

Add verb

Used with zones that inherit from the class. Adds a control that a user has selected from a catalog of controls to a specified zone.

Configure verb

Used with zones that inherit from the class. Opens a view to enable users to configure existing connections.

Disconnect verb

Used with zones that inherit from the class. Terminates an existing connection between two controls.

As for the standard verbs that are associated with controls, their actions apply to the control itself (or to its child controls). The part control acts as a container for the verb and manages the rendering of the verb. Most standard verbs associated with part controls appear either directly in the title bar or in a drop-down verbs menu within the title bar. Whether these verbs appear directly in the header or in a verbs menu is determined by the property; by default, the verbs appear in a verbs menu. The following table lists common verbs associated with the various controls and describes their actions.

Part control verb

Action

Minimize verb

Appears in the verbs menu of each server control contained in a zone. Reduces the control to a minimal representation, hiding everything in its UI except the restore verb.

Restore verb

Appears in the verbs menu of each server control contained in a zone. Returns a minimized control to its normal size and view.

Close verb

Appears in the verbs menu of each server control contained in a zone. Closes a control and adds it to the page catalog, which means the control is removed from the page but, if there is a properly designed catalog, users can reopen the closed control and return it to the page.

Connect verb

Appears in the verbs menu of a control contained in a zone, if the page is in connect display mode and if the control can form connections. Opens a connection UI so that users can create a connection between controls.

Delete verb

Appears in the verbs menu of a control contained in a zone, if the control was added to the page programmatically (rather than being declared in persistence format). Permanently deletes the control instance and any associated personalization data so that, unlike a closed control, the deleted instance can never be restored to the page.

Edit verb

Appears in the verbs menu of a control contained in a zone, if the page is designed to permit editing of controls and if the page is in edit display mode. Selects the control for editing and opens the editing UI.

Export verb

Appears in the verbs menu of a control contained in a zone, if the control and application are enabled for export. Opens a dialog box that enables users to export a description file that contains the serialized state of the control. For details, see the property.

Help verb

Appears in the verbs menu of a control contained in a zone, if the control is designed to provide a Help file. Launches a page that provides help for the control.

Along with the standard verbs that are provided with the Web Parts control set, you can also create custom verbs. A common scenario for creating custom verbs is to create verbs associated with controls. When you create these verbs, by default they will appear on the verbs menu along with the standard verbs. The basic approach for creating such verbs is to inherit from the class to create one or more custom verbs. Then create a control that inherits from the base class and add the custom objects to a collection. This collection can then be added to the collection of the control, which will cause the custom verbs to appear automatically on the control's verbs menu at run time. As with the standard verbs, you can access the custom verbs programmatically on a control.

Web Parts applications can use server controls that do not inherit from the class, such as custom controls, user controls, or ASP.NET controls. These server controls, if added to a zone, are dynamically wrapped with a object at run time, which enables them to function as run-time controls. To add custom verbs to a server control that does not inherit from the class, the server control must implement the interface and override its property.

When you create a verb, you can create two types of associated event handlers that will run when a user clicks the verb: a server-side event handler (code that runs on the server), and a client-side event handler (code that runs in the client browser). Also, you can define custom states for verbs, which is a useful way to provide visual cues to users. For example, you could create a state indicating that a verb has been selected, and then provide appropriate changes in the UI to notify the user that the verb is already selected. Another useful behavior is the ability to disable verbs; by doing this, you can prevent users from clicking verbs if doing so would be harmful or ineffective based on the state of the application.

The class does not expose any unique methods; its exposed methods are all overrides of base methods. It does however contain a number of properties for developers to be aware of. The property indicates whether a verb is currently selected. The and properties refer to the respective handlers within the class (if any exist) for client and server click events. The property contains text that describes the purpose of a verb in a ToolTip when users position a mouse pointer over the verb in the UI. The property indicates the current status of a verb, which determines whether a user can click the verb and execute its action. The property provides a unique ID for the verb object. The property contains a URL to an image that can be used to represent a verb in the UI in place of the default rendering (typically a button or a hyperlink). The property contains the label text that appears directly on the verb in the UI. The overridden property determines whether a verb is currently displayed in the UI. Verbs are often hidden or disabled at different times in a Web Parts application; for example, specialty verbs (such as the edit verb and the connect verb) are displayed only when the appropriate controls, settings, and display modes exist on the page to enable those verbs to take meaningful action.

Other key members for working with verbs include the method, which is an event handler that can be overridden for custom handling of the verb creation process, and the event.

Provides an interactive user interface (UI) element that enables users to perform actions on a Web Parts page.

- Constructor
  To be added.

  This class constructor refers to a client-side event handler to call when the user clicks a verb in the user interface (UI).

  Initializes a new instance of the class and associates a client-side click event handler with the instance.

  A that is the unique identifier for a verb.
  2.0.0.0
- Constructor

  This class constructor refers to a server-side click event handler to call when the user clicks a verb in the user interface (UI).

  Initializes a new instance of the class and associates a server-side click event handler with the instance.

  A that is the unique identifier for a verb.
  A that handles click events on the server.
  2.0.0.0
- Constructor

  This class constructor refers to both client-side and server-side click event handlers to call when the user clicks a verb in the user interface (UI).

  Initializes a new instance of the class and associates both client and server-side click event handlers with the instance.

  A that is the unique identifier for a verb.
  A that handles click events on the server.
  A that refers to the client-side handler for click events.
  2.0.0.0
- Property
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DefaultValue(false)
  System.Boolean To be added.

  This property is not used with any of the standard verbs provided with the Web Parts control set. When it is used with custom verbs, and the property value is set to true, a selected check box appears next to the verb to indicate the active status of the verb.

  The purpose of this property is to give developers a way of indicating that some custom state associated with a verb is currently active. For example, suppose a developer creates a custom verb that enlarges the text size (for accessibility purposes) of the body text on all controls in a zone. If a user clicks the verb, this property value could be set to true, which would cause a selected check box to appear next to the Increase Text Size verb in the verbs menu, indicating to users that the state associated with the verb (enlarged text) is active.

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

  Gets or sets a value indicating that some state associated with a custom verb is currently active or selected.

  2.0.0.0
- Property
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.String To be added.

  Use this property to retrieve the name of the method that handles click events for the verb on the client.

  Gets the string containing the method name of the client-side event handler defined in the constructor.

  2.0.0.0
- Property
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.Localizable(true)
  System.String To be added.

  Use this property to get or set a description of a verb that appears as a ToolTip when a user positions a mouse pointer over the verb.

  Gets or sets a short description of the verb.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue(true)
  System.ComponentModel.NotifyParentProperty(true)
  System.Boolean To be added.

  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 controls in a zone for any reason, the developer can set the property value on the 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 and ASP.NET Themes Overview.

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

  2.0.0.0
- Property
  System.String To be added.

  The value of the ID property must be specified as a parameter when calling any of the overloads of the constructor for the class.

  Gets a string containing a unique ID for a verb.

  2.0.0.0
- Property
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.Localizable(true)
  System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design", "UITypeEditor, System.Drawing")
  System.String To be added.

  The property provides a way to use a customized visual representation for verbs as an alternative to the default rendering, which is typically a button or a hyperlink. If you assign a URL to the property, the image appears in verbs menus (next to the verb) or directly in forms (in place of a button or hyperlink that represents the verb).

  Gets or sets a string containing a URL to an image that represents a verb in the user interface (UI).

  2.0.0.0
- Property
  System.Boolean To be added. To be added.

  Gets a value that indicates whether view state is currently being tracked for a verb.

  2.0.0.0
- Method
  System.Void ``

  This method is used primarily by the .NET Framework infrastructure and is not intended to be used directly from your code. However, control developers can override this method to specify how a custom server control restores its view state. For more information, see ASP.NET State Management Overview.

  This method determines whether there is any existing from a previous page request, and if so, restores it. Included in the process of restoring view state is the verb's visibility, which is determined by the value of the property.

  Restores view-state information from a previous page request that was saved by the method.

  An that contains the view state to be restored. 2.0.0.0
- Method
  System.Object

  If there is any view-state data, this method calls the base method and saves the data.

  Saves a object's view-state changes that occurred since the page was last posted back to the server.

  An that contains the state data to be saved.

  2.0.0.0
- Property
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.Web.UI.WebControls.WebParts.WebPartEventHandler To be added.

  Use this property to get a reference to the method that handles the server-side click events for a verb.

  Gets a reference to the method that handles server-side click events for the verb.

  2.0.0.0
- Property
  2.0.0.0
  System.Boolean To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The method simply calls the property on the class.

  Implements the property by calling the class's own property.

- Method
  2.0.0.0
  System.Void ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The method simply calls the method on the class.

  Implements the method of the interface by calling the class's own method.

  An that contains the view state to be restored.
- Method
  2.0.0.0
  System.Object

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The method simply calls the method on the class.

  Implements the method by calling the class's own method.

  Returns an containing the control's current view state. If no view state is associated with the control, this method returns null.

- Method
  2.0.0.0
  System.Void

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The method simply calls the method on the class.

  Implements the method by calling the class's own method.

- Property
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.Localizable(true)
  System.String To be added.

  This property sets the text of the label for a object; it is what represents the verb to users in the UI.

  If developers (optionally) assign a value to the property, an image or icon represents the verb in the UI, and in certain cases (such as when the verb is normally rendered by a button or hyperlink) the image appears instead of the text label.

  Gets or sets the text label for a verb that is displayed in the user interface (UI).

  2.0.0.0
- Method
  System.Void

  This method enables view state to be tracked for a .

  Tracks view-state changes to a verb so the changes can be stored in the verb's object.

  2.0.0.0
- Property
  System.Web.UI.StateBag To be added.

  Because the object does not inherit from any class that tracks view state, and yet it has a number of properties that require view state to be tracked across multiple requests for the page, it implements its own property to maintain view state.

  Gets a dictionary of state information that allows you to save and restore the view state of a server control across multiple requests for the same page.

  2.0.0.0
- Property
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.Localizable(true)
  System.ComponentModel.DefaultValue(true)
  System.Boolean To be added.

  Verbs often need to be hidden or displayed depending on the content of a Web Parts application. For example, the minimize verb is hidden when a control is already minimized, and conversely, the restore verb is hidden when the control is in its normal, non-minimized state.

  A verb whose property is set to false is hidden from users, but is still rendered on a page, can still be accessed programmatically, and still fully participates in page and control life cycle events.

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

  Gets or sets a value that indicates whether a verb is visible to users.

  2.0.0.0