asp.net.ph

Skip Navigation LinksHome > ASP.NET Applications > ASP.NET Optimization > ASP.NET Trace Functionality > Page-level Tracing

Page-level Tracing

ASP.NET Web Applications   ASP.NET Trace Functionality


At the page level, you can use the TraceContext object to to write custom debugging statements that appear at the end of the client output delivered to the requesting browser. ASP.NET also inserts some helpful statements regarding the start and end of lifecycle methods, like Load and Dispose.

Each statement is associated with a category that you define for organizational purposes, and timing information is automatically collected by the ASP.NET runtime. You can choose to sort the output either in the order that processing occurred or alphabetically by category.

Because you can explicitly enable or disable tracing for a page, these statements may be left in the production code for a page with no impact to the page’s performance.

Essentially, there are two steps involved in viewing trace statements in a page, whether you generate it from a code-behind file or in a code declaration block. The first is to write the statements you want to include to the trace log, and the second is to enable the page to display those messages and other trace information. For information on these subjects, see the following topics:

See Also

Application-level Tracing



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note