Apr 30, 2010 09:29 AM
(This post was last modified: Apr 30, 2010 04:19 PM by codepoet.)
Code
Sub Log(ByVal txt As String)
'Open a file for writing
Dim FILENAME As String = Server.MapPath("Log.txt")
Get a StreamReader class that can be used to read the file
Dim objStreamWriter As StreamWriter
objStreamWriter = File.AppendText(FILENAME)
objStreamWriter.WriteLine(DateTime.Now.ToString() + " >> " + txt)
'Close the stream
objStreamWriter.Close()
End SubRewritten by me from VB6
If You Like this tutorial,
please check out my other tutorials by clicking ==> here
please check out my other tutorials by clicking ==> here
PHP & .NET Contributor.

