Results 1 to 6 of 6

Thread: [RESOLVED]ASP.net 2.0 appending to a text file

Threaded View

  1. #1

    Thread Starter
    Member computerguy46's Avatar
    Join Date
    Jan 2006
    Posts
    32

    Resolved [RESOLVED]ASP.net 2.0 appending to a text file

    i am trying to append to a log file. i ca create the file and write but the next time it will overwrite the last everything in the file.

    Dim sdate As DateTime = DateTime.Now.ToShortDateString()
    Dim stime As DateTime = DateTime.Now.ToShortTimeString()
    Dim TextFile As New StreamWriter("C:\jetpaytool" & Format(sdate, "yyyyMMdd") & ".log")

    TextFile.WriteLine(Format(sdate, "yyyyMMdd") & " " & Format(stime, "HH:MM") & " " & "auth release " & GridView1.Rows.Count.ToString & " Rows " & TextBox1.Text & " " & TextBox2.Text & " " & TextBox3.Text)
    TextFile.Close()



    thanks in advance
    Last edited by computerguy46; Jul 15th, 2008 at 06:54 PM. Reason: resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width