Button.Click Event

Definition

Occurs when the Button control is clicked.

public event EventHandler Click;

Examples

The following code example demonstrates how to specify and code an event handler for the Click event in order to display a message on the Web page when the Button control is clicked.

Remarks

The Click event is raised when the Button control is clicked. This event is commonly used when no command name is associated with the Button control (for instance, with a Submit button).

For more information about handling events, see Events.