Tab

ASPxCallback.Callback Event

Fires when a round trip to the server has been initiated by a call to the client ASPxClientCallback.PerformCallback method.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll

Declaration

public event CallbackEventHandler Callback

Event Data

The Callback event's data class is CallbackEventArgs. The following properties provide information specific to this event:

Property Description
Parameter Gets a string that contains specific information (if any) passed from the client side.
Result Gets or sets a string that contains specific information (if any) that needs to be passed to the client side for further processing.

Remarks

The Callback event allows any desired server-side processing to be performed in response to a call to the client ASPxClientCallback.PerformCallback method and any resulting required information to be passed to the client for further processing (if needed).

Specific information passed from the client side can be obtained via the CallbackEventArgsBase.Parameter property. After this information has been processed on the server side, a specific result can be passed back to the client side via the CallbackEventArgs.Result property. The necessary processing can then be performed and completed on the client side in a handler of the client ASPxClientCallback.CallbackComplete event which is passed with the parameter and resulting values through its ASPxClientCallbackCompleteEventArgs.parameter and ASPxClientCallbackCompleteEventArgs.result properties.

Example

The complete sample project is available in the DevExpress Code Central database at E36.

function ShowImage(id) {
    if (ASPxCallback1.InCallback()) 
        return;
    document.getElementById('imageCell').innerHTML = 'Loading...';
    ASPxCallback1.PerformCallback(id);
}
See Also