public void logError(string strError, string strSource) {
System.Diagnostics.EventLog oEV = new System.Diagnostics.EventLog();
oEV.Source = strSource;
oEV.WriteEntry (strError, System.Diagnostics.EventLogEntryType.Error);
oEV.Close(); }
catch(System.Exception err) { Logger oLogger = new Logger(); oLogger.logError(err.ToString(),"TestApplication"); }
Build Your Own ASP.NET Website Using C# & VB.NET