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. Advertisements

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. Mike John

    How can I write to text file.(ftp)

    Mike John, Jul 18, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    606
    Cowboy \(Gregory A. Beamer\)
    Jul 18, 2003
  2. Krish
    Replies:
    1
    Views:
    1,232
    =?Utf-8?B?Q3VydF9DIFtNVlBd?=
    Oct 20, 2005
  3. flamesrock
    Replies:
    5
    Views:
    748
    Philippe C. Martin
    May 4, 2005
  4. walterbyrd
    Replies:
    7
    Views:
    542
    Asun Friere
    May 17, 2007
  5. scad
    Replies:
    4
    Views:
    1,202
    James Kanze
    May 28, 2009
  6. Replies:
    7
    Views:
    694
    Mick White
    Feb 2, 2005
  7. acord
    Replies:
    3
    Views:
    212
    Evertjan.
    Mar 24, 2006
  8. Iulian Ilea
    Replies:
    1
    Views:
    487
    pcx99
    Dec 21, 2006
Loading...