My page is building the response, and unless I add something manually to the
header, such as
Response.AddHeader "content-disposition", "attachment; filename=""" &
fileName & """"
the file should open automatically in the browser. It works fine for PDF
files...
"Chandra Sekhar" <Ch*************@am.joneslanglasalle.com> wrote in message
news:e2**************@TK2MSFTNGP10.phx.gbl...
May be your IIS is writing out a header for caching.
Sekhar.
"George Durzi" <gd****@hotmail.com> wrote in message
news:uY*************@TK2MSFTNGP09.phx.gbl... I'm writing an ASPX page to open a .txt file, and display it in the
browser. Here's what I'm doing:
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "text/plain"
Response.WriteFile(sExportPath)
Response.Flush()
Response.Close()
What happens is that I did an open/save dialog.
If I choose Save, it wants to save the file as MyASPXPageName.aspx
and if I choose open, it opens the .aspx file which contains text.
Anyway that I can actually get this to open in the browser?