View Single Post
  #2 (permalink)  
Old September 12th, 2003, 05:33 AM
pgtips pgtips is offline
Friend of Wrox
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post

For the sake of the archive, I've found a workaround for this; add this line:
Response.AddHeader "Content-Disposition", "inline;filename=temp.txt"

Yes, I know that adding a filename to the inline looks like nonsense, but I found an article in MSDN about how IE decides on the MIME type. This article talked about it looking at a combination of
- content-type header
- actual data sent
- file extension
(interestingly, it said that IE searches for a number of pre-defined content-types such as text/html, but text/plain isn't one of them!)

so, I decided that the .asp extension was probably confusing it and the only way I could think to associate it with a text file was to use the Content-Disposition header.

BTW it still works in NS6.2

Well, there you go, problem solved
Reply With Quote