O'Reilly logo

Applied ASP.NET 4 in Context by Adam Freeman

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

Handling Errors

To demonstrate the different techniques for handling errors, we need a web application that will generate them on demand. To that end, we'll create an ASP.NET application that will let us select one of three different C# exceptions to throw when we submit a form.

Creating the Handling Errors Example

To create the sample project, follow these steps:

  1. Create a new Visual Studio project using the ASP.NET Empty Web Application template.
  2. Given the project the name Handling Errors, as shown in Figure 7-1.
    images

    Figure 7-1. Creating the Handling Errors project

  3. To add a web page, select Project Add New Item.
  4. Select the Web Form template, ...

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