System.Web.UI.WebControls.ButtonColumn.CommandName Property

Gets or sets a string that represents the command to perform when a button in the System.Web.UI.WebControls.ButtonColumn object is clicked.

Syntax

[System.ComponentModel.DefaultValue("")]
public virtual string CommandName { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the ButtonColumn.CommandName property to associate a command name, such as Add or Remove, with a button. You can set the ButtonColumn.CommandName property to any string that identifies the action to perform when a button in the System.Web.UI.WebControls.ButtonColumn object is clicked. Then, you can determine programmatically the command name in the event handler for the DataGrid.ItemCommand event and perform the appropriate actions.

The value of this property is stored in view state.

Requirements

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