Using Forms and Models

In this chapter, we will learn how to build forms for displaying and capturing data for use in our application, how to bind controls to models, and how to use validation techniques to exclude invalid data. We will cover client-submitted data—namely, HTML forms and their server-side counterpart, models, and files. With these, we will learn how to deal with user-submitted data.

Specifically, we will talk about the following:

  • Using the form context
  • Working with the model
  • Understanding the model metadata and using metadata to influence form generation
  • How can we use HTML helpers to generate HTML
  • Working with templates
  • Binding forms to object models
  • Validating the model
  • Using AJAX
  • Uploading files

Technical requirements ...

Get Modern Web Development with ASP.NET Core 3 - Second Edition 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.