/ Published in: C#

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private void Log(string txt) { string logFile = Server.MapPath("/") + "log.txt"; // create a writer and open the file // write a line of text to the file tw.WriteLine(DateTime.Now + " >> " + txt); // close the stream tw.Close(); }
Comments
