views:

276

answers:

2

Is there anyway to download multiple files from an ASP.NET page?

What I want is, the method for downloading multiple files from an ASP.NET page without prompting the user with Save dialog box, the files should be get downloaded into some particular location in the client's machine (where the ASP.NET page is browsed).

I tried creating an ActiveX control in VB6 for getting the response stream from ASP.NET page and storing locally with some file names. And int the page, I tried Response.WriteFile method to write the file to the response stream with the content type set to octectstream.

Still working more with this solution. Is there any other simple way? Please let me know.

Thank you.

+1  A: 

I'm afraid not. It's not a ASP.NET issue, but rather the way HTTP works.

A common work-a-round is to zip the files before delivering to the user. For exactly what you need, it has to be using stuff like ActiveX, Java Applet, Flash etc,

o.k.w
A: 

Using that ActiveX component, you can define a protocol to exchange data with your ASP.NET website and to write your files anyway you want. But, as o.k.w said, it's a HTTP behavior, not a .NET issue.

Rubens Farias
Yes, I can understand. For my project, the zip will not be an acceptable way. Thank you for all your help! Will try the ActiveX control and update.
Prasanna
Remember ActiveX restricts you to Internet Explorer only, but it does look like it's your best bet. If your app is running on an intranet, it might be an option to use shared network folders.
Veli