ButtonColumn.CommandName Property
.NET Framework 3.0
Gets or sets a string that represents the command to perform when a button in the System.Web.UI.WebControls.ButtonColumn object is clicked.
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
/** @property */ public String get_CommandName () /** @property */ public void set_CommandName (String value)
public function get CommandName () : String public function set CommandName (value : String)
Not applicable.
Property Value
A string that represents the command to perform when a button in the ButtonColumn is clicked. The default is an empty string ("").Use the CommandName property to associate a command name, such as Add or Remove, with a button. You can set the 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 ItemCommand event and perform the appropriate actions.
The value of this property is stored in view state.
Community Additions
ADD
Show: