Solved

Downloading files in ASP.NET using Response object

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 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