Empty window after file download with Content-Disposition

  • Thread starter Thread starter gluggi
  • Start date Start date
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
 
Hi,

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


Thanks

Martin
 
Back
Top