How To write to a text file.

Discussion in 'ASP .Net' started by Ravikanth[MVP], Jul 18, 2003.

  1. Hi

    Use the following code.

    string sJoblogFileName = "TextFile.txt";
    System.IO.StreamWriter LogFile =new System.IO.StreamWriter
    (sJoblogFileName,true);
    LogFile.WriteLine("blah blah blah");
    LogFile.Close();

    HTH
    Ravikanth


    >-----Original Message-----
    >I want to write to text file the follow text "My name is
    >Mike"
    >
    >now I have used the follow systax
    >dim strPath as string = "C:\"
    >dim strFileName as string
    >.
    >
     
    Ravikanth[MVP], Jul 18, 2003
    #1
    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. flamesrock
    Replies:
    5
    Views:
    579
    Philippe C. Martin
    May 4, 2005
  2. Replies:
    7
    Views:
    389
    Mick White
    Feb 2, 2005
  3. acord
    Replies:
    3
    Views:
    118
    Evertjan.
    Mar 24, 2006
  4. Iulian Ilea
    Replies:
    1
    Views:
    326
    pcx99
    Dec 21, 2006
  5. Tim Chase
    Replies:
    0
    Views:
    102
    Tim Chase
    Dec 16, 2013
Loading...

Share This Page