jimmythegeek
Programmer
I have a dowload page that is called from another page. On the dowload page, I get the file I need to download, and download it (which works great). At the end of the code, I need to redirect back to my calling page, but it is not working. I assume it's because of the response.flush.
If I take the flush out, the download doesn't work at all. It works the same using response.end. Is it possible to redirect after a flush?
I've tried using server.transfer, putting javascript with location.replace, and the such, but to no avail. I would greatly appreciate any assistance I could get on this. Thanks in advance
===============
... Get file code ...
with response
.Buffer = True
.Clear
.AddHeader "Content-Disposition", "attachment; filename=" & f.name
.AddHeader "Content-Length", intFilelength
.CharSet = "UTF-8"
.ContentType = "application/octet-stream"
.BinaryWrite s.Read
.Flush
.redirect
end with
===============
Also, if I put any code (html, javascript, etc) after this, it gets written into any text file I download, and thoughts on that?
This whole file upload/download thing is a pain and I have not done it before.
Jim Lunde
compugeeks@hotmail.com
We all agree your theory is crazy, but is it crazy enough?
If I take the flush out, the download doesn't work at all. It works the same using response.end. Is it possible to redirect after a flush?
I've tried using server.transfer, putting javascript with location.replace, and the such, but to no avail. I would greatly appreciate any assistance I could get on this. Thanks in advance
===============
... Get file code ...
with response
.Buffer = True
.Clear
.AddHeader "Content-Disposition", "attachment; filename=" & f.name
.AddHeader "Content-Length", intFilelength
.CharSet = "UTF-8"
.ContentType = "application/octet-stream"
.BinaryWrite s.Read
.Flush
.redirect
end with
===============
Also, if I put any code (html, javascript, etc) after this, it gets written into any text file I download, and thoughts on that?
This whole file upload/download thing is a pain and I have not done it before.
Jim Lunde
compugeeks@hotmail.com
We all agree your theory is crazy, but is it crazy enough?