CHAPTER 5

image

Working with Razor

A view engine procezses ASP.NET content and looks for instructions, typically to insert dynamic content into the output sent to a browser and Razor is the name of the MVC Framework view engine. There are no changes to Razor in MVC 5 and if you are already familiar with the syntax from earlier versions you can skip ahead.

In this chapter, I give you a quick tour of the Razor syntax so you can recognize Razor expressions when you see them. I am not going to supply an exhaustive Razor reference in this chapter; think of this more as a crash course in the syntax. I explore Razor in depth as I continue through the book, ...

Get Pro ASP.NET MVC 5, Fifth 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.