System.Web.TraceContext.IsEnabled Property

Gets or sets a value indicating whether tracing is enabled for the current Web request.

Syntax

public bool IsEnabled { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use this flag to check whether your page or application should output tracing information before it writes anything to the trace log.

The value of the TraceContext.IsEnabled property depends on the settings in the trace subsection of the system.web configuration section and the value of the trace attribute of the @ Page directive. The tracing option set in the page directive takes precedence over the option set in the configuration file. Setting the TraceContext.IsEnabled value programmatically takes precedence over both the page directive attribute and the configuration setting.

Note:

If you set the TraceContext.IsEnabled property to true for an entire application, you must explicitly set this property to false for any page in the application for which you do not want tracing information displayed.

Requirements

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