Solved

Downloading files in ASP.NET using Response object

Posted on 2004-04-19
1
384 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

839 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