Solved

Downloading files in ASP.NET using Response object

Posted on 2004-04-19
1
386 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

724 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