By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,728 Members | 1,150 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,728 IT Pros & Developers. It's quick & easy.

Empty window after file download with Content-Disposition

P: n/a
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

May 3 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

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

Martin

May 5 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.