Skip to main content
A newer version of this page is available. .

ASPxClientCallback.SendCallback(parameter) Method

Obsolete. Sends a callback to the server and generates the server-side ASPxCallback.Callback event passing it the specified argument.

Declaration

SendCallback(
    parameter: string
): void

Parameters

Name Type Description
parameter string

A string value that represents any information that needs to be sent to the server-side ASPxCallback.Callback event.

Remarks

Use the SendCallback method if you need to asynchronously go to the server and perform some server-side processing using AJAX-based callback technology. You can pass the required information which can be collected on the client side as a string of arguments (for instance, in the “Name = Value;” form) via the SendCallback method’s parameter parameter.

The SendCallback method posts back to the server using the callback technology and generates a specific server-side ASPxCallback.Callback event. The method’s parameter argument is passed to the ASPxCallback.Callback event’s handler as the CallbackEventArgsBase.Parameter property. So, the necessary server-side actions can be performed in a handler of the ASPxCallback.Callback event based upon the values of the arguments which can be obtained by parsing the passed information string.

After the callback is processed in the ASPxCallback.Callback event’s handler, the resulting information can be passed back to the client side via the event’s CallbackEventArgs.Result property. Then, the client-side ASPxClientCallback.CallbackComplete event is generated on the client allowing the final client processing of the callback to be performed.

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