© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. FreemanPro ASP.NET Core 6https://doi.org/10.1007/978-1-4842-7957-1_21

21. Using Controllers with Views, Part I

Adam Freeman1  
(1)
London, UK
 
In this chapter, I introduce the Razor view engine, which is responsible for generating HTML responses that can be displayed directly to the user (as opposed to the JSON and XML responses, which are typically consumed by other applications). Views are files that contain C# expressions and HTML fragments that are processed by the view engine to generate HTML responses. I show how views work, explain how they are used in action methods, and describe the different types of C# expressions they contain. In Chapter 22, I ...

Get Pro ASP.NET Core 6: Develop Cloud-Ready Web Applications Using MVC, Blazor, and Razor Pages 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.