CHAPTER 41

image

Client-Side Validation

In Chapter 34, we showed you how to use validation attributes with the model binding feature to ensure that the user submits valid data when creating model objects. In this final chapter, we will revisit this topic and look at client-side validation in more detail.

When using model binding, the form is shown to the user again if there are any problems with the data, along with a summary of those problems. The user can then correct the problems and submit the data again. Validation feedback from the server seemed responsive because the browser and the server are on the same device. In a deployed application it ...

Get Pro ASP.NET 4.5 in VB, Fifth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.