This documentation is archived and is not being maintained.

TraceContext Class

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

For a list of all members of this type, see TraceContext Members.


[Visual Basic]
NotInheritable Public Class TraceContext
public sealed class TraceContext
public __gc __sealed class TraceContext
public class TraceContext

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


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.


Namespace: System.Web

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

Assembly: System.Web (in System.Web.dll)

See Also

TraceContext Members | System.Web Namespace