System.Web.UI.WebControls.Button.CommandName Property

Gets or sets the command name associated with the System.Web.UI.WebControls.Button control that is passed to the Button.Command event.

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

When you have multiple System.Web.UI.WebControls.Button controls on a Web page, use the Button.CommandName property to specify or determine the command name associated with each System.Web.UI.WebControls.Button control. You can set the Button.CommandName property with any string that identifies the command to perform. You can then programmatically determine the command name of the System.Web.UI.WebControls.Button control and perform the appropriate actions.

Additional information about the command, such as Ascending, may be specified 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