17 Rendering HTML using Razor views

This chapter covers

  • Creating Razor views to display HTML to a user
  • Using C# and the Razor markup syntax to generate HTML dynamically
  • Reusing common code with layouts and partial views

It’s easy to get confused between the terms involved in Razor PagessPageModel, page handlers, Razor views—especially as some of the terms describe concrete features, and others describe patterns and concepts. We’ve touched on all these terms in detail in previous chapters, but it’s important to get them straight in your mind:

  • Razor Pages—Razor Pages generally refers to the page-based paradigm that combines routing, model binding, and HTML generation using Razor views.

  • Razor Page—A single Razor Page represents a single page ...

Get ASP.NET Core in Action, Third 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.