ASPxCallback Class

A non-visual component that allows you to make a round trip to the server (send a custom callback request) and perform server-side actions. The component cannot update other controls in a callback.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll


public class ASPxCallback :


The ASPxCallback control allows you to send callbacks from the client side and then process them both on the server and client sides.


The ASPxCallback control cannot update any visual control on a web page. For this purpose, use the ASPxCallbackPanel control that serves as a container. Use the callback panel to send a callback to the server and update any control within the panel.

Run Demo

Create a Callback Control

Design Time

The ASPxCallback control is available on the DX.21.1: Components toolbox tab in the Microsoft Visual Studio IDE.

Drag the control onto a form and customize the control’s settings, or paste the control markup in the page’s source code.


To properly function, DevExpress controls require that special modules, handlers and options are registered in the the Web.config file. Switch the Microsoft Visual Studio IDE to the Design tab to automatically update the Web.config file with the required DevExpress information.

<dx:ASPxCallback ID="ASPxCallback1" runat="server">

Run Time

using DevExpress.Web;
protected void Page_Load(object sender, EventArgs e)
    ASPxCallback callback = new ASPxCallback();
    callback.ID = "ASPxCallback2";

    callback.ClientInstanceName = "cb";
    callback.Callback += new CallbackEventHandler(ASPxCallback_Callback);
protected void ASPxCallback_Callback(object source, CallbackEventArgs e)
    // your code

Client-Side API


Available by default.

Client object type


Access name





Use the PerformCallback(parameter) method to send a callback to the server. The InCallback method allows you to get whether the callback is sent. Handle the CallbackComplete client event or the Callback server event to process the callback.

You can use the JSProperties property to send information from the server to the client.

View Example: How to update several controls in a single callback using the ASPxCallback control

<dx:ASPxButton ID="ASPxButton1" runat="server" Text="Get time from server" AutoPostBack="False">
    <ClientSideEvents Click="function(s, e) { callbackControl.PerformCallback(); }" />

<dx:ASPxCallback ID="ASPxCallback1" runat="server" ClientInstanceName="callbackControl" 
    <ClientSideEvents CallbackComplete="function(s, e) {
        document.getElementById('editorContainer').innerHTML = s.cpTextBox1;
    }" />

<table id="formContainer">
        <td id="editorContainer">
            <asp:TextBox ID="TextBox1" runat="server" Width="200px" ></asp:TextBox>
            <dx:ASPxTextBox ID="ASPxTextBox1" runat="server" ClientInstanceName="textBox2" Width="200px" />
protected void ASPxCallback1_Callback(object source, DevExpress.Web.ASPxCallback.CallbackEventArgs e){
    ASPxCallback callbackControl = source as ASPxCallback;
    string time = DateTime.Now.ToString("T");
    TextBox1.Text = time;
    callbackControl.JSProperties["cpTextBox1"] = ASPxCallback.GetRenderResult(TextBox1);
    callbackControl.JSProperties["cpTime"] = time;
See Also