Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Empty window after file download with Content-Disposition

Reply
Thread Tools

Empty window after file download with Content-Disposition

 
 
gluggi@bigfoot.com
Guest
Posts: n/a
 
      05-03-2006
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

 
Reply With Quote
 
 
 
 
gluggi@bigfoot.com
Guest
Posts: n/a
 
      05-05-2006
Hi,

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


Thanks

Martin

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forcing Download of File Appends HTML from Download Page to Downloaded File? Brett Kelly ASP .Net 1 06-16-2006 04:05 AM
file download with WriteFile method gives an empty file ? =?Utf-8?B?RXJpYyBC?= ASP .Net 1 02-06-2006 11:33 AM
problem with code download file - two window file download Sam -- ASP .Net 2 03-17-2005 04:20 PM
File upload/download from database. Download appends aspx page to end of file Ryan Taylor ASP .Net 2 11-10-2004 08:31 PM



Advertisments