Downloading Multiple files in ASP

Results 1 to 2 of 2

Thread: Downloading Multiple files in ASP

  1. #1
    Join Date
    Dec 1969

    Default Downloading Multiple files in ASP

    Hi Folks,<BR> I have an access database that basically keep the path of files that I have to download. Now, what I would like to do is have each of the records appear in a table (This is working) and have a check button next to that. Now, when I select multiple check boxes and click download, I want to download all the files that I have selected...This last part is what I can&#039;t figure out how to do. If anyone could provide some assistance, that would be awesome. An example would be even better ;-) Thanks so much<BR><BR>Harry

  2. #2
    Join Date
    Dec 1969

    Default RE: Downloading Multiple files in ASP

    Maybe you could take the following and add it to a while not myrec.eof type loop....<BR><BR>Response.ContentType = contype<BR>Response.AddHeader "Content-Disposition","filename=" & filename<BR>set objStream = server.CreateObject("ADODB.Stream")<BR>objStream.O pen<BR>objStream.Type = 1 &#039; binary<BR>on error resume next<BR> objStream.LoadFromFile realpath<BR> if Err.number &#060;&#062; 0 then<BR> CRaise Err.Number <BR> end if<BR>on error goto 0<BR>&#039; Write the contents of the file to the client.<BR>Response.BinaryWrite objStream.Read<BR>objStream.Close<BR>set objStream = nothing<BR>Response.End<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts