Download file dialogue appears twice using Content-Disposition 'attachment' submitted from a form

Discussion in 'ASP .Net' started by ben, Jul 7, 2004.

  1. ben

    ben Guest

    The "Download file" dialogue prompts the user twice if Open is pressed
    when using Content-Disposition 'attachment' if, and only if, the
    script was submitted from a form. If Save As is pressed you don't get
    the prompt a second gtime btw.

    If the script is simply executed from a querystring the dialogue
    appears only once as you would expect.

    The code I am using to throw content to the browser as an attachment
    is:

    Response.AddHeader("Content-Disposition",
    "attachment;filename=blah.txt")
    Response.ContentType = "text"
    Response.Write("BLAH")
    Response.End()

    It's weird, it's easily recreated and occures consistantly with IE 6.

    Hope someone can help!
     
    ben, Jul 7, 2004
    #1
    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. =?Utf-8?B?R1JF?=
    Replies:
    1
    Views:
    3,422
    Craig Deelsnyder
    Aug 20, 2004
  2. Costas Andriotis
    Replies:
    0
    Views:
    1,181
    Costas Andriotis
    Oct 15, 2004
  3. Sergio Juan
    Replies:
    1
    Views:
    1,031
    mohammad.h.ashmawi
    Apr 29, 2011
  4. Ed
    Replies:
    10
    Views:
    46,265
    alok000707
    Jul 13, 2010
  5. Bob Jones
    Replies:
    2
    Views:
    523
    Bob Jones
    Nov 13, 2007
Loading...

Share This Page