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

ASPxClientUploadControlFileUploadCompleteEventArgs.callbackData Property

Gets a string that contains specific information (if any) passed from the server side for further client processing.

Declaration

callbackData: string

Property Value

Type Description
string

A string value representing callback data passed from the server.

Remarks

Use the callbackData property to obtain specific information which has been collected on the server while handling the ASPxUploadControl.FileUploadComplete server event, and passed via the FileUploadCompleteEventArgs.CallbackData property to the client for final processing.

Example

<script type="text/javascript">
     function onFileUploadStart(s, e) {
          DXUploadedFilesContainer.Clear();
     }
     function onFileUploadComplete(s, e) {
          if(e.callbackData) {
               var fileData = e.callbackData.split('|');
               var fileName = fileData[0],
                    fileUrl = fileData[1],
                    fileSize = fileData[2];
               DXUploadedFilesContainer.AddFile(fileName, fileUrl, fileSize);
          }
     }
</script>
    ...
<dx:ASPxUploadControl ID="UploadControl" runat="server" ClientInstanceName="UploadControl" Width="100%"
     NullText="Select multiple files..." UploadMode="Advanced" ShowUploadButton="True" ShowProgressPanel="True"
     OnFileUploadComplete="UploadControl_FileUploadComplete">
     <AdvancedModeSettings EnableMultiSelect="True" EnableFileList="True" EnableDragAndDrop="True" />
     <ValidationSettings MaxFileSize="4194304" AllowedFileExtensions=".jpg,.jpeg,.gif,.png">
     </ValidationSettings>
     <ClientSideEvents FilesUploadStart="onFileUploadStart" FileUploadComplete="onFileUploadComplete" />
</dx:ASPxUploadControl>

<dx:UploadedFilesContainer ID="FileContainer" runat="server" Width="100%" Height="180" 
     NameColumnWidth="240" SizeColumnWidth="70" HeaderText="Uploaded files" />
See Also