Button::Click Event

 

Occurs when the Button control is clicked.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public:
event EventHandler^ Click {
	virtual void add(EventHandler^ value) sealed;
	virtual void remove(EventHandler^ value) sealed;
}

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 Handling and Raising Events.

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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: