Chapter 16 Quick Reference


Chapter 16 Quick Reference

To

Do This

Prepare a Web site for debugging

Include the following in Web.Config:

<system.web>    <compilation debug="true"/> </system.web>

Enable tracing for an entire application

Include the following in Web.Config:

<system.web>     <trace enabled="true"/> </system.web>

Enable tracing for your page

Set the Page class's trace attribute to true using either the property page in Visual Studio or by declaring trace=true in the page directive

Debug a Web application in Visual Studio

Ensure that the debug attribute is turned on in Web.Config

Start the program running in debug mode by

1. Selecting Debug | Start Debugging from the main menu

OR

2. Hitting the F5 key

Set up breakpoints in an application in Visual Studio

Place the cursor on the line at which you'd like to stop execution and

1. Select Debug | Toggle Breakpoint

OR

2. Hit the F9 key

Execute a line of source code in the Visual Studio debugger

While the debugger is running and execution has stopped at the line you'd like to execute

1. Select Debug | Stop Over from the main menu

OR

2. Hit the F10 key

Step INTO a line of source code in the Visual Studio debugger

While the debugger is running and execution has stopped at the line you'd like to execute

Instruct ASP.NET to show a specific page when an error occurs

Assign the error handling page to the specfic error in the <customErrors> section of Web.Config

Trap specific errors in ASP.NET

Handle uncaught exceptions within the Application_Error handler in Global.ASAX. Usually, redirect to a specific page




Microsoft ASP. NET 2.0 Programming Step by Step
Microsoft ASP.NET 2.0 Step By Step (Step By Step (Microsoft))
ISBN: B002KE5VYO
EAN: N/A
Year: 2005
Pages: 177

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net