Connecting Tech Pros Worldwide Help | Site Map

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

ben
Guest
 
Posts: n/a
#1: Nov 18 '05
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!
Closed Thread