JasonBie

2012年4月11日

Page Tracing

摘要: Enabling Tracing<%@PageTrace="true"...%>orprotectedvoidPage_Load(Objectsender,EventArgse){Trace.IsEnabled=true;}By default, trace messages are listed in the order they were written by your code. Alternatively, youcan specify that messages should be sorted by category using the TraceM 阅读全文

posted @ 2012-04-11 16:24 JasonBie 阅读(237) 评论(0) 推荐(0) 编辑

Logging Exceptions

摘要: Writing to the Event LogYou can interact with event logs in an ASP.NET page by using the cl asses in the System.Diagnosticsnamespace. First, import the namespace at the beginning of your code-behind file:using System.Diagnostics;The following example rewrites the simple ErrorTest page to use event l 阅读全文

posted @ 2012-04-11 15:44 JasonBie 阅读(235) 评论(0) 推荐(0) 编辑

导航