link to open txt file in notepad

Discussion in 'ASP .Net' started by Daves, May 3, 2006.

  1. Daves

    Daves Guest

    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?
    Daves, May 3, 2006
    #1
    1. Advertising

  2. Daves

    Hans Kesting Guest

    > 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
    Hans Kesting, May 3, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Uk4gRGFz?=
    Replies:
    5
    Views:
    8,271
    srajput
    May 23, 2008
  2. RNDAS
    Replies:
    1
    Views:
    12,584
    Nate Hekman
    Apr 26, 2005
  3. ml
    Replies:
    0
    Views:
    1,450
  4. Sameen
    Replies:
    2
    Views:
    441
    Victor Bazarov
    Aug 29, 2005
  5. boris
    Replies:
    1
    Views:
    1,830
Loading...

Share This Page