What is the reason for validation?
What do you do if you want a button to post the page without checking validation?
What is the best type of validator to use for a radio button list?
What's the difference between the
values of the
Suppose the first item in your drop-down list is "Choose a payment method." How do you make sure users choose one?
What's the benefit of using the
What control should you use to make sure the user can't order more of a single item than you actually have in stock?
Suppose you run a hotel that requires at least two guests stay in a double room, but no more than five guests. What control should you use on the "Number of guests" field?
How do you check that the user has entered a valid email address?
Suppose your theme park offers discounts to customers between the ages of 6 and 12, and also customers over 65. What kind of control would you use to validate the customer is eligible for a discount, while still using a single age field?
Exercise 5-1. In the exercises in this chapter, you're going to create a form that users can fill out if they want to participate in a friendly phone survey (I'm told some people like to get survey calls in the middle of dinner). To begin, create a page with a table with three columns: label, control, and validator. Then add text boxes for the user's name, address, city, state, and zip code. Be sure to add the appropriate validators for each field—don't ...