The Button control can act as a regular HTML button, Link or ImageButton.
You can specify the display type of the control by setting the DisplayType property. Set the UseSubmitBehavior property to specify whether the control should render as a submit button.
The ImageUrl and ActiveImageUrl properties can be used to specify either a background image or an icon to be displayed by the control.
The following events are exposed by the Button class.
Event | Event arguments | Description |
---|---|---|
EventArgs | Raised when the control is clicked. | |
CommandEventArgs | Raised when the control is clicked. |
You can access the control on the client side by its ClientID.
JavaScript
![]() |
---|
var button = $find("Button1"); |
The following client-side event are exposed by the Button class.
Event | Event arguments | Script property | Description |
---|---|---|---|
- | Raised when a control is clicked. | ||
- | Raised just after the control has finished loading and is ready for interaction. |