Solved

Downloading files in ASP.NET using Response object

Posted on 2004-04-19
1
382 Views
Last Modified: 2012-05-05
Hi,
Iam using the Response object to download files. In the application, the user can select multiple files for download. But the code I wrote works fine only for a single download. i.e It downloads only the first selected file. Can somebody tell me how to download multiple files in one shot??
This is the code i wrote for downloading files:

        Response.Clear()
        Response.Buffer = True
        Response.ContentType = "application/octet-stream; name=" & Filename
        Response.AddHeader("content-transfer-encoding", "binary")
        Response.AddHeader("content-disposition", "attachment;filename=" & Filename & "")
        Response.ContentEncoding = System.Text.Encoding.GetEncoding(1251)

Thanks in advance
0
Comment
Question by:amiteshsinha
1 Comment
 
LVL 7

Accepted Solution

by:
culshaja earned 500 total points
ID: 10860062
I don't think you can. What you might be able to do is to open a page that invokes a JavaScript that opens up a window per download each with the URL that is required to start the download.

James :-)
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now