The Button Control enables the creation of rich, graphical buttons that function like traditional HTML form buttons. Unlike traditional HTML form buttons, buttons created with the Button Control can have labels that are different from their value. With the inclusion of the optional Menu Control, the Button Control can also be used to create menu buttons and split buttons, controls that are not available natively in HTML. Moreover, the Button Control allows you to create more visually engaging implementations of radio-button and check-box controls.
The Button Control enables the creation of eight different types of buttons:
Push Button (type "push")
Basic push button that can execute a user-specified command when pressed.
Link Button (type "link")
Navigates to a specified URL when pressed.
Submit Button (type "submit")
Submits the parent form when pressed.
Reset (type "reset")
Resets the parent form when pressed.
Checkbox Button (type "checkbox")
Maintains a "checked" state that can be toggled on and off.
Radio Button (type "radio")
Maintains a "checked" state that can be toggled on and off. Use with the ButtonGroup class to create a set of controls that are mutually exclusive; checking one button in a group will uncheck all others.
Menu button (type "menu")
When pressed will show/hide a menu.
Split Button (type "split")
Can execute a user-specified command or display a menu when pressed.
To use the Button Control, include the following source files: