Enable Trace Feature in ASP.NET

Introduction

Trace is an ASP. NET feature that displays some useful information that you can't get by using the debugger. The ASP. NET Trace feature traces the execution of a page and displays trace information and other information at the bottom of that page.

Enable Trace feature

To use the Trace feature, you must first enable tracing. To active the Trace feature for a page, you add a Trace attribute to the page directive at the top of the aspx file for the page and set its value to true to this attribute as showm below.

 enable-image.jpg

When you run the page, trace information will be displayed at the end of the page output. When you enable the Trace feature, it is enabled only for the current page, which is usually what you want. To enable tracing for another page, you must modify the page directive. Once this feature has been enabled for a page, ASP. NET adds trace output to the page whenever the page is requested.

The trace information is divided into several tables that provide specific types of trace information. For example, the Trace information table provides information about how the page request was processed, and the Session State table provides information about the items currently stored in session state.

result.jpg

Up Next
    Ebook Download
    View all
    Learn
    View all