System.Web.UI.WebControls.Button.Command Event

Occurs when the System.Web.UI.WebControls.Button control is clicked.

Syntax

public event CommandEventHandler Command

Remarks

The Button.Command event is raised when the System.Web.UI.WebControls.Button control is clicked. This event is commonly used when a command name, such as Sort, is associated with the System.Web.UI.WebControls.Button control. This allows you to create multiple System.Web.UI.WebControls.Button controls on a Web page and programmatically determine which System.Web.UI.WebControls.Button control is clicked.

Note:

The Button.Command event is raised through the control hierarchy in the form of the BubbleEvent.

For more information about handling events, see Consuming Events.

Requirements

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