Blogs

News

Email Subscriptions

Mehul Harry's DevExpress Blog

ASP.NET File Manager - Download Files (available now in v2011.1)

     

Check out the new 'Download File' feature of our slick ASP.NET File Manager that's available now in DXperience v2011.1 release:

DevExpress ASP.NET File Manager's New Download File Feature in FireFox Browser

Download Selected File

With the next major release, your end-users will have the ability to download a selected file from the User Interface of the ASPxFileManager!

New Toolbar Button

A new toolbar item has been introduced: the Download button. It's hidden by default and to show it, just set:

SettingsToolbar.ShowDownloadButton = true

New Client-Side API

A new client-side method and event have been added to help you with the download file feature:

The new client-side method, ASPxClientFileManager.Download, helps you to invoke the selected file download. For example, you can call it from an external button like so:

ASPxClientFileManager.GetSelectedFile().Download();

There's also a new client-side event called FileDownloading which helps you to add things like a confirmation dialog:

FileDownloading="function(s, e) {
    e.cancel = !confirm('Are you sure you want to download ' + e.file.name + ' ?');
}"

New Server-Side Event

A new server-side event called FileDownloading has been added. The new event helps you work with the file stream. For example, you can use this server-side event to add a watermark to the downloaded image files:

// Arguments members:
// FileManagerFile File
// Stream InputStream - stream of file from file system
// Stream OutputStream - is null, but you can set new stream (replace original input stream) for downloading
// bool Cancel
           
// For example:

protected void ASPxFileManager1_FileDownloading(object source, DevExpress.Web.ASPxFileManager.FileManagerFileDownloadingEventArgs e) {
    if (IsImageExtension(e.File.Extension))
        e.OutputStream = AddWatermarkToImage(e.InputStream);
}

Part of v2011 vol 1

The new 'Download File' feature of our ASP.NET File Manager is available now with DXperience v2011 volume 1 release.

 

What do you think of the new download file feature?

Drop me a line below with your thoughts. Thanks.

 

DXperience? What's That?

DXperience is the .NET developer's secret weapon. Get full access to a complete suite of professional components that let you instantly drop in new features, designer styles and fast performance for your applications. Try a fully-functional version of DXperience for free now: http://www.devexpress.com/Downloads/NET/

Follow MehulHarry on Twitter

Published Mar 24 2011, 10:40 AM by Mehul Harry (DevExpress)
Technorati tags: Features, v2011.1, DXperience, ASP.NET
Bookmark and Share

Comments

 

Paul Cowan_1 said:

Glad to see this finally available in this great control.

March 25, 2011 3:25 PM
 

Ahmed Permassa said:

This looks great but there are some professional controls like [...] which allows you to view/manage the folders according to permissions.

August 3, 2011 10:26 AM
 

Mehul Harry (DevExpress) said:

August 12, 2011 3:31 PM
 

Giorgio Russo said:

Hello, How can I get Filename ID from a Link Custom Provider =

April 7, 2012 6:14 AM
 

Mehul Harry (DevExpress) said:

Giorgio,

Please post your question here and our support team can help you:

www.devexpress.com/.../CreateIssue.aspx

Thanks.

April 9, 2012 3:01 PM

About Mehul Harry (DevExpress)

Mehul Harry is an ASP.NET technical evangelist at Developer Express. You can reach him directly at mharry@DevExpress.com. You can also follow him on Twitter: http://twitter.com/mehulharry
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.