O'Reilly logo

Special Edition Using® Microsoft® ASP.NET by Richard Leinecker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Trace Messages

The first thing to understand is how to add trace messages to ASP.NET pages. All you must do is add a Trace=True attribute to the @page directive at the top of the ASPX page, as follows:

<%@ Page language=”c#” Trace=”true” Codebehind=”WebForm1.aspx.cs” 
   AutoEventWireup=”false” 
   Inherits=”Chapter22.WebForm1” %> 

Adding the Trace=True attribute ASP.NET generates extensive information about requests made to that page and appends it as part of a page rendering, as shown in Figure 22.1.

Figure 22.1. Adding Trace=true to the @Page directive causes ASP.NET to output extensive trace information.

Consider for a minute what kind of information ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required