Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > link to open txt file in notepad

Reply
Thread Tools

link to open txt file in notepad

 
 
Daves
Guest
Posts: n/a
 
      05-03-2006
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?


 
Reply With Quote
 
 
 
 
Hans Kesting
Guest
Posts: n/a
 
      05-03-2006
> 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


 
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
counting how often the same word appears in a txt file...But my codeonly prints the last line entry in the txt file dgcosgrave@gmail.com Python 8 12-19-2012 06:29 PM
How to open text file (.log, .txt etc) in notepad from aspnet =?Utf-8?B?Uk4gRGFz?= ASP .Net 5 05-23-2008 06:53 AM
how to use io operations with open/save file dialog box in file menu for simple notepad boris Java 1 07-22-2007 04:13 PM
Notepad Refuses To Open TXT Files on 2x-Click Sens Fan Happy In Ohio Computer Support 3 07-14-2004 01:54 AM
Change .txt icon from notepad to editpad in XP Pro Dave Watson Computer Support 3 08-16-2003 05:02 PM



Advertisments