Results 1 to 6 of 6

Thread: Exporting/Downloading

  1. #1

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057

    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

  2. #2
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    What are you trying to do, get it to pop up a download box?
    Alcohol & calculus don't mix.
    Never drink & derive.

  3. #3

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    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

  4. #4

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    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

  5. #5
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Try reading in the file line by line into a variable and then Response.Write() it (the variable).
    Alcohol & calculus don't mix.
    Never drink & derive.

  6. #6

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    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

Posting Permissions

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



Click Here to Expand Forum to Full Width