C H A P T E R 5
Forms and Validation
Until now, our server-side code has provided dynamic content but it also has been a one-way operation—we have only been concerned with presenting content to the user. In this chapter we will learn how to make our sites much more interactive by taking user input and performing operations based on it.
User input is commonly gathered through the use of HTML forms; we can interrogate the form contents using Razor code once the form has been submitted. When we have learned how to retrieve the data from the submitted form, we will look at ways of validating the data submitted by users, both to ensure that they ...