Chapter 9Validating User Input
WHAT YOU WILL LEARN IN THIS CHAPTER:
- What user input is and why it’s important to validate it
- What ASP.NET 4.5.1 has to offer to aid you in validating user input
- How to work with the built-in validation controls and how to create solutions that are not supported out of the box
- How to send e-mail using ASP.NET
- How to read text files
WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
You can find the wrox.com code downloads for this chapter on the Download Code tab at www.wrox.com/go/begaspnet451. The code is in the Chapter 9 folder.
So far you have been creating a fairly static website where you control the layout and content by adding fixed pages to the site and its navigation menus. But you can make your site a lot more attractive by incorporating dynamic data. This data usually flows in two directions: it either comes from the server and is sent to the end user’s browser, or the data is entered by the user and sent to the server to be processed or stored.
Data coming from the server can be retrieved from many different data sources, including files and databases, and is often presented with the ASP.NET data controls. You see how to access databases in Chapter 12 and onward.
The other flow of data comes from the user and is sent to the server. The scope of this information is quite broad, ranging from simple page requests and “Contact Us” forms to complex shopping cart scenarios and wizard-like user interfaces, but the underlying principle of this data ...
Get Beginning ASP.NET 4.5.1: in C# and VB now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.