Empty window after file download with Content-Disposition

G

gluggi

Hi,
I have a small problem when I try to save a file. In an ASPX page in
the Page_Load method I do something like that: (VB)

Response.ClearHeaders()
Response.AddHeader("Content-Disposition", "attachment;
filename=foo.jpg")
Response.Clear()
Response.ContentType = "application/octlet-stream"
Response.BinaryWrite( some data I got elsewhere )
Response.Flush()
Response.Close()

Saving, Opening works fine, but an empty window is remaining.
If I remove the line ..AddHeader("Content-Disposition", .. then the
filename is set to the aspx page name, but the empty windows is gone.

Does anyone know why that happens and how I can close that empty
window.
I use ie6 sp2 on xp.

Thanks

Martin
 
G

gluggi

Hi,

no answers???
No one has this problem? Or is there no solution?
Did I make errors?


Thanks

Martin
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top