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

Performing Manual Validation

We are going to start by demonstrating the problem that validation solves: preventing the user from entering nonsensical data into form fields. To do this, we will use the swimming calculator example again. Listing 17-1 contains the markup for the Default.aspx page, added to a Visual Studio project created using the Empty ASP.NET Application template.

Listing 17-1. The markup for Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebFormsApp.Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"images  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ...

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