The button incorporates many more features over the standard ASP.NET button, link button, or image button controls. It supports the IButtonControl interface, but attempts to minimize and simplify the output rendered. It also has an AJAX interface. Some of the
server-side properties (with client-side equivalents) are:
- ButtonClientEvents - An object that stores all of the client AJAX event handlers for button events (not just click, but other).
- DisableUntilPageLoad - Whether to disable the button until all scripts have loaded. This can ensure less errors due to scripts not being loaded (for trigger-happy users).
- DisableOnFirstClick - Disables the button when the button is first clicked.
- DisableOnFirstClickTimeout - A timeout, in milliseconds, to use to re-enable the button, only when DisableOnFirstClick is set to true.
- PostbackAlways - Whether to postback to the server always; mostly useful from the client. For instance, if a button has its RenderMode set to Client or ClientAndServer, if PostbackAlways is set to true, the button will postback to the server. Can be changed
on the client.
- VisibilityGroup - The group that the button fits within the ButtonList control.
This component uses the same list of properties as available on the server, including the command name/argument, and other standard IButtonControl properties. (Note the properties is in lower-camel case).
- needPostback - This event fires to enable you to determine whether the button should postback to the server, rather than using the postbackAlways property.
- refresh - Refreshes the UI with the changes to the client-side property.