11 Client-side technologies and AJAX

This chapter covers

  • Choosing your client-side technology
  • Calling page handlers from client-side code
  • Working with JSON in Razor Pages
  • Isolating CSS styles on a per-page basis

All the code examples we have worked with have relied on the HTML for the page being generated in full on the server, except in one area: client-side validation. The validation error messages were generated using client-side libraries, specifically Microsoft’s jQuery Unobtrusive Validation library. As a feature, client-side validation enhances the usability of the website. It gives users instant feedback on form validation errors, without waiting for the entire form to be submitted to the server for processing.

Usability is critical ...

Get ASP.NET Core Razor Pages in Action 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.