System.Web.UI.WebControls.ImageButton.CommandName Property

Gets or sets the command name associated with the System.Web.UI.WebControls.ImageButton control.

Syntax

[System.Web.UI.Themeable(false)]
[System.ComponentModel.DefaultValue("")]
public string CommandName { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use this property to specify the command to perform when the System.Web.UI.WebControls.ImageButton control is clicked, such as Sort, Cancel, or Edit. This allows multiple System.Web.UI.WebControls.ImageButton controls to be placed on the same Web page. The value in this property can then be programmatically identified in the ImageButton.OnCommand(CommandEventArgs) event handler to determine the appropriate action to perform when each System.Web.UI.WebControls.ImageButton control is clicked.

Supplemental information about the command, such as specifying ascending sort order, can be included by using the Button.CommandArgument property.

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

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0