Gets or sets a value indicating whether tracing is enabled for the current Web request.
Assembly: System.Web (in System.Web.dll)
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 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 value programmatically takes precedence over both the page directive attribute and the configuration setting.
If you set the 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.
The following code example demonstrates how you can determine whether tracing is enabled for a page. The code iterates through the rows in a dataset, writing trace statements for each row in that dataset.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.