Advanced Visual Basic 2010 Chapter 9 Programming Challenge 5 Vacation Rentals with Validation
Use the Vacation Rentals application presented in Section 9.7 as a starting point for this programming challenge. Add the following validation rules to the Rental Request page, using the ASP.NET validation controls:
• All inputs are required.
• The number of people must be between one and eight.
• The number of weeks must be between one and twelve.
• The starting date must be at least three days from today but not greater than 120 days from today.
The default first item in the Location DropDownList should be (select). Add an email input field to the Vacation Rental Request Web page. Use RequiredFieldValidator and RegularExpressionValidator controls to make sure the email is not blank and that it is a valid email address. Add a ValidationSummary control to the page. Use Figure 9-52 as a sample of the user interface, shown after the user has entered all inputs. You will need to add an email field to the RentalInfo class so the user’s email can be preserved in Session state when returning from the Confirmation form to the Rental Request page.
There are no reviews yet.