Tab

ASPxCaptcha.ClientSideEvents Property

Gets an object that lists the client-side events specific to the ASPxCaptcha.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll

Declaration

public CallbackClientSideEventsBase ClientSideEvents { get; }

Property Value

Type Description
CallbackClientSideEventsBase

A CallbackClientSideEventsBase object which allows assigning handlers to the client-side events available to the ASPxCaptcha.

Remarks

The ClientSideEvents property provides access to an object of the CallbackClientSideEventsBase type. This object contains properties whose names correspond to the events available to the ASPxCaptcha on the client side. These properties provide the capability to assign handling JavaScript functions to the required client-side events of the ASPxCaptcha control.

Example

The following part of the ASPxCaptcha - Custom Appearance online demo illustrates how to implement a captcha control with a custom appearance.

In this example, the control’s Refresh Button.ASPxCaptcha and Text Box.ASPxCaptcha are hidden, and their functionaliry is implemented in a custom manner using separate controls (the IMG element, ASPxLabel, ASPxTextBox).

function GetRefreshButton() {
    return document.getElementById("refreshButton");
}        

function OnCaptchaBeginCallback(s, e) {
    var refreshButton = GetRefreshButton();
    refreshButton.src = "Images/refreshButtonAnimated.gif";
}

function OnCaptchaEndCallback(s, e) {
    var refreshButton = GetRefreshButton();
    refreshButton.src = "Images/refreshButton.gif"; 
    tbCode.SetValue("");
...   
}
See Also