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

ASPxCallback Class

A callback control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.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.

Create a Callback Control

Design Time

The ASPxCallback control is available on the DX.20.2: 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 (ASPxClientCallback.PerformCallback) method to send a callback to the server. The (ASPxClientControlBase.InCallback) method allows you to get whether the callback is sent. Handle the (ASPxClientCallback.CallbackComplete) client event or the ASPxCallback.Callback server event to process the callback.

<dx:ASPxCallback ID="ASPxCallback1" runat="server" ClientInstanceName="Callback1"
    <ClientSideEvents CallbackComplete="OnCallbackComplete" />
protected void ASPxCallback1_Callback(object sender, CallbackEventArgs e) {
    string xpath = string.Format("//items/item[@newsID='{0}']", e.Parameter);
    XmlNode node = XmlDataSource1.GetXmlDocument().SelectSingleNode(xpath);
    if(node != null)
        e.Result = node.Attributes["Description"].Value;
function OnCallbackComplete(s, e) {
    var strFeedID = e.parameter.toString();
    var loadingPanel = document.getElementById("lp" + strFeedID);
    var detailsContainer = document.getElementById("details" + strFeedID); = "none"; = "";
    detailsContainer.innerHTML = e.result;


The Concept of Callbacks

Online Demo

ASPxCallback - Demo

See Also