Back to Devexpress

Why it is impossible to download files on callbacks

aspnet-403753-troubleshooting-server-side-issues-impossible-download-files-on-callback.md

latest1005 B
Original Source

Why it is impossible to download files on callbacks

  • Sep 27, 2023

Error Description

The control clears the callback result and passes the file content to the server response when you download a file on a callback. In this case, client-side objects cannot ascertain the result returned to the browser and the objects’ state becomes broken. Information passed to the response during a callback can corrupt callback data and cause unexpected behavior.

Solution

To solve this issue, call the export method on a postback, for example, in the server-side ASPxButton.Click event handler. To download a file on a callback, refer to the following online example: How to load a file on a callback sent by the ASPxGridView.

See Also