Skip to main content
.NET Framework 4.5.2+
  • The page you are viewing does not exist in the .NET 6.0+ platform documentation. This link will take you to the parent topic of the current section.

FileDataDownloader Class

Used by the File Attachments module to send files to the client in ASP.NET Web Forms XAF Applications.

Namespace: DevExpress.ExpressApp.FileAttachments.Web

Assembly: DevExpress.ExpressApp.FileAttachment.Web.v23.2.dll

NuGet Package: DevExpress.ExpressApp.FileAttachment.Web

Declaration

public class FileDataDownloader

Remarks

The FileDataDownloader class is used by the File Attachments module to send files to the client in ASP.NET Web Forms XAF Applications. To execute custom code when a file is downloaded, inherit the FileDataDownloader class and override the FileDataDownloader.DownloadCore method.

public class MyDownloader : FileDataDownloader {
        public override void DownloadCore(DevExpress.Persistent.Base.IFileData fileData) {
        // Place your code here.
        base.DownloadCore(fileData);
    }
}

Note

The DownloadCore method writes the file to the response and ends the response. So, place your custom code before the base.DownloadCore method call.

To register your FileDataDownloader descendant, call the static FileDataDownloader.SetDownloader method in the Application_Start method located in the Global.asax.cs (Global.asax.vb) file:

using DevExpress.ExpressApp.FileAttachments.Web;
//...
protected void Application_Start(object sender, EventArgs e) {
    FileDataDownloader.SetDownloader(new MyDownloader());
//...
}

Inheritance

Object
FileDataDownloader
See Also