set header problem

Discussion in 'ASP General' started by prash, Jul 2, 2003.

  1. prash

    prash Guest

    Hi All

    Response.setHeader("Content-disposition", "attachment; filename="+ fileName
    + strExt);
    works for IE 5.5 but not in netscape .
    IE 5.5 shows the save as dialog box
    NN4.79 display the contents on the browser
    how can i get the save as dialog box in NN4.79



    /thansk in advance

    prash
     
    prash, Jul 2, 2003
    #1
    1. Advertising

  2. prash

    dany Guest

    "prash" <> wrote in message
    news:...
    > Hi All
    >
    > Response.setHeader("Content-disposition", "attachment; filename="+

    fileName
    > + strExt);
    > works for IE 5.5 but not in netscape .
    > IE 5.5 shows the save as dialog box
    > NN4.79 display the contents on the browser
    > how can i get the save as dialog box in NN4.79
    >

    I had the same problem, worked with ADODB.Stream
    No I have still a few problems (look at bottom of message for script +
    problems)

    d.

    <%
    Dim Stream
    Dim Contents
    Dim strFileName
    Dim strFilePath

    strFileName = "download.pdf"

    strFilePath = Server.MapPath(strFileName)

    Response.ContentType = "application/octet-stream"
    Response.AddHeader "content-disposition", "attachment; filename=" &
    strFileName

    Set Stream = server.CreateObject("ADODB.Stream")
    Stream.Open
    Stream.LoadFromFile strFilePath
    Contents = Stream.ReadText
    Response.BinaryWrite Contents
    Stream.Close
    Set Stream = Nothing
    %>

    TESTED ON:
    --------------
    PC:
    IE6+: ok
    OPERA7+: ok
    NS4+: ok

    NS7+: gives a saveas-popup but adds ".asp" to the file "download.pdf" =>
    download.pdf.asp
    MOZ1.2+: same as NS7
    OPERA6+: don't work, displays a lot off sh*beep*t

    MAC
    SAFARI: ok
    IE5.2: gives popup but pdf can't be opened due to decoding-error?
     
    dany, Jul 2, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Newsgroup - Ann
    Replies:
    4
    Views:
    716
    lilburne
    Nov 2, 2003
  2. John Smith

    Header files included in header files

    John Smith, Jul 21, 2004, in forum: C Programming
    Replies:
    18
    Views:
    612
    Jack Klein
    Jul 24, 2004
  3. Replies:
    3
    Views:
    1,310
    Walter Roberson
    May 1, 2006
  4. Bit byte
    Replies:
    1
    Views:
    659
    benben
    Apr 19, 2006
  5. mlt
    Replies:
    2
    Views:
    854
    Jean-Marc Bourguet
    Jan 31, 2009
Loading...

Share This Page