Razor Views
Learning Objectives
By the end of this chapter, you should understand:
- The benefits of using templates
- How to create a template using a Razor View in an MVC application
- How to add iteration, conditionals, and forms to a template
- How to link a template to static resources like CSS stylesheets, scripts, images, etc.
- How to render a template using ASP.NET controllers
Key Terminology
Creating a Template
- Razor templates
@
View()
method
Using a Template
ViewBag
The Shared Directory
- Partial View