Chapter 15: Viewmodels and Model Validation

Major Concepts

By the end of this chapter, you should understand:

  1. What ViewModels are and why we should use them.
  2. How and why to validate model data in ASP.NET.
  3. How to use C# validation attributes.
  4. How to employ good error handling when bad data is entered.

Key Terminology

ViewModels and Passing Data Between Views

  1. ViewModel

Side-Server Validation

  1. Validation
  2. Client-Side Validation
  3. Server-Side Validation

Validation and Views

  1. Unobtrusive Validation