TActiveButton

TActiveButton is the active control counter part to TButton. When a TActiveButton is clicked, rather than a normal post back request a callback request is initiated. The OnCallback event is raised during a callback request and it is raise after the OnClick event.

When the ActiveControl.EnableUpdate property is true, changing the Text property during a callback request will update the button's caption on the client-side.

Since the OnCallback event is raised only during a callback request, the OnCallback event handler can be used to handle logic specifically related to callback requests. The OnClick event handler is raised when ever the button is clicked, even if javascript is disabled.

The following example the use of both the OnClick and OnCallback events of an TActiveButton.