asp.net.ph

TraceContext Class

System.Web Namespace


Captures and presents execution details about a Web request. This class cannot be inherited.

TraceContext Class Members

Collapse   Constructors

Visibility Constructor Parameters
public TraceContext ( HttpContext context )

Collapse   Properties

Visibility Name Value Type Accessibility
public IsEnabled Boolean [ Get , Set ]
public TraceMode TraceMode [ Get , Set ]

Collapse   Methods

Visibility Name Parameters Return Type
public Warn ( String category , String message ) Void
public Warn ( String message ) Void
public Warn ( String category , String message , Exception errorInfo ) Void
public Write ( String message ) Void
public Write ( String category , String message ) Void
public Write ( String category , String message , Exception errorInfo ) Void

Collapse   Events

Multicast Name Type
multicast TraceFinished TraceContextEventHandler

Remarks

You can use this class to append messages to specific trace categories. For example, if you are creating an instance of the Calendar class for your application, you might include the trace message "Starting To Render" in a rendering procedure, and "Firing OnChange Event" in an event handler procedure.

To enable tracing, set the Trace attribute in the @ Page directive or the IsEnabled property. When tracing is enabled, in addition to showing user-provided trace content, the Page class automatically includes performance data, control-tree structure information, and state management content.

Syntax


To set a property or call a method:

Trace.propertyName = value;
Trace.methodName ( arguments );
  C# VB

To return the value of a property:

Type var = Trace.propertyName;
  C# VB

See Also

ASP.NET Trace Functionality   TraceMode Enumeration Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph