The page you create will prompt the user for an e-mail address, the number of people to reserve for, and a preferred date.
The page also allows the user to request a telephone confirmation of the reservation.
(This is particularly important if you take user input, store it someplace, and then display it later — for example, as a blog comment, user review, or something like that.) To help prevent these problems, ASP.
NET Web Pages automatically HTML-encodes any text content that you output from your code.
You will use a The validation you added to the Web Forms page illustrates the basic concepts of Web validation controls.
An important aspect of validation is understanding how it helps you increase the security for your Web site.
(In a production application, you generally do more interesting things with user input.
You will work with some controls that perform all checking automatically, requiring no code.However, in this case you can create client-side code that performs essentially the same check that your server-side code is performing.In the final part of the walkthrough, you will add some optional information to the reservation form.For example, when you display the content of a variable or an expression using code such as Users make mistakes.You ask them to fill in a field, and they forget to, or you ask them to enter the number of employees and they type a name instead.Users can check a box to indicate that they want telephone confirmation of their reservation.