-
Exporting/Downloading
Please tell me what is wrong with this code... It worked fine in 5.0 but now in 5.5 it won't... I am creating a comma seperated string
(session("strExport")) then am redirecting to a file containing this code:
<%
strFilename = "List_" & Date() & ".csv"
strFilename = Replace(strFilename, "/", "_")
Response.Addheader "Content-Disposition", "attachment; filename=" & strFilename
response.write session("strExport")
%>
thanks in advance,
Michael
-
What are you trying to do, get it to pop up a download box?
-
yes. Sorry I didn't give more detail (just sick of it right now). it USED TO pop up a d/l box with the file name that i constructed in the code but now it tries to get the user to d/l the frameset.
Thanks
Michael
-
I cannot figure this one out... its so frustrating because it works in IE 5.0 but not 5.5... I am using response.redirect to get to the file (which worked before) but now (in 5.5) it tries to download the framset html that the page the export buttion is on is in. it will work in 5.5 however if I use a javascript window.open to make it open in a new window... but, the problem there is that leaves behind an blank open browser window. Also... is there a list some where of all the things Microsoft did to IE to mess up developers like myself? this is the 3rd thing I have had to redo on this project after upgrading my office's browsers.
Thanks in advance,
Michael
-
Try reading in the file line by line into a variable and then Response.Write() it (the variable).
-
If I understand you correctly I am already doing that. In the code that calls to the code in the originating post I build the string line by line and put it into a session variable, then (in the code posted) I response.write it.
Michael