Skip to main content

FileUploadCompleteEventArgs.CallbackData Property

Gets or sets a string that contains specific information (if any) to be passed from the server side to the client.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web


public string CallbackData { get; set; }

Property Value

Type Description

A String value representing callback data.


Use the CallbackData property to define specific information which has been collected on the server side, and should be passed to the client for further processing within the ASPxClientUploadControl.FileUploadComplete client event.

The example below demonstrates how to upload an image to the server and display the uploaded image on a web page:

<script type="text/javascript">
    function OnFileUploadComplete(s, e) {
        document.getElementById('image').src = e.callbackData;
<form id="form1" runat="server">
        <dx:ASPxUploadControl ID="Upload" runat="server" ShowUploadButton="True" OnFileUploadComplete="Upload_FileUploadComplete">
            <ValidationSettings AllowedFileExtensions=".jpg,.jpeg,.jpe,.gif">
            <ClientSideEvents FileUploadComplete="OnFileUploadComplete" />
        <br />
        <img src="Images/DefaultImage.jpg" id="image" alt="Please load image" />
protected void Upload_FileUploadComplete(object sender, FileUploadCompleteEventArgs e)
    e.CallbackData = String.Format("Images\\Picture{0}.jpg", DateTime.Now.ToString("yyyy-MM-dd hh-mm-ss"));
    string path = Page.MapPath("~/") + e.CallbackData;

View Example: Upload Control for ASP.NET Web Forms - How to upload an image and display it on a web page

See Also