link to open txt file in notepad

D

Daves

a simple aspx page just needs to send a particular .txt file to stream so
that it opens up in Notepad on client side. Using ContentType = "text/plain"
it still opens in IE browser as a html file, what trick is needed?
 
H

Hans Kesting

a simple aspx page just needs to send a particular .txt file to stream so
that it opens up in Notepad on client side. Using ContentType = "text/plain"
it still opens in IE browser as a html file, what trick is needed?

Do you have the http-header Content-Disposition=attachment ?

Response.AppendHeader("Content-Disposition", "attachment");

or even

Response.AppendHeader("Content-Disposition",
"attachment;filename=file.txt");



Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top