I’m using web forms to write various files to http content output stream. I don't think this is relevant but the files are stored as blob data and I use Response.BinaryWrite to write the output. [The browser is IE6.0.2]
Most file types open and are saved ok e.g. .xls, .doc, .jpg open up in their appropriate applications. Xls saved as excel, doc saved as word, jpg saved as jpegs
.Html,.htm files and .txt files are problematic..Html files are superimposed in the web form browser as opposed to opening up in a new browser.
Text files although saved as text have the html content for the originating web form appended.
Here’s what I think is the relevant snippet of my code:
Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName)
Dim MyData() As Byte
MyData = myRow("blobdata")
Response.Buffer = True
Response.BinaryWrite(MyData)
Majella
Most file types open and are saved ok e.g. .xls, .doc, .jpg open up in their appropriate applications. Xls saved as excel, doc saved as word, jpg saved as jpegs
.Html,.htm files and .txt files are problematic..Html files are superimposed in the web form browser as opposed to opening up in a new browser.
Text files although saved as text have the html content for the originating web form appended.
Here’s what I think is the relevant snippet of my code:
Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName)
Dim MyData() As Byte
MyData = myRow("blobdata")
Response.Buffer = True
Response.BinaryWrite(MyData)
Majella