Digital Colony is the ad-free technical web site for Michael Allen Smith of Seattle, WA.
Amazon Link ASP.NET Report DeepFitness API Geocoding GridView Highlighter Mask Email SmugMug
Microsoft Silverlight 4 Business Application Development: Beginners Guide by Cameron Albert
logFile = "C:\SomePath" Sub LogEvent (pageName, user, message) Const ForWriting = 2 Const ForAppending = 8 Set fs = CreateObject("Scripting.FileSystemObject") If fs.FileExists(logFile) Then Set logFile = fs.OpenTextFile(logFile, ForAppending) Else Set logFile = fs.CreateTextFile(logFile, True) End If logFile.WriteLine(Now() & vbTab & pageName & vbTab & user & vbTab & message) logFile.Close Set logFile = nothing Set fs = nothing End Sub
<!--#include virtual="/inc/logEvent.asp" -->
Call LogEvent("Home", "Larry King", "Referred from Google")
Labels: ASP, FileInfo
posted by MAS on Oct 1,2007
If you found this site helpful, consider buying me a cup of coffee.
Digital Colony Copyright © 1999-2010 XHTML 508 Try...Catch Disclaimer: For brevity many examples do not include error handling. That is your responsibility.