System.Web.TraceContext Class

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

See Also: TraceContext Members

Syntax

public sealed class TraceContext

Remarks

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

You can also use the System.Web.TraceContext class to obtain a set of trace records at the end of request execution for custom processing. For more information, see ASP.NET Tracing Overview.

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

Requirements

Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0