Using View Pages, Partial Views, View Components, and Tag Helpers
ASP.NET Core 2.0 and Razor, when coupled with Visual Studio 2017, provide several functionalities for creating your MVC views. In this section, you will see how those functionalities can help you to be more productive.
You can, for instance, create views by using the Visual Studio 2017 integrated scaffolding features, which you have already done in previous chapters multiple times. It allows you to automatically generate the following types of views:
- View Pages
- Partial Views
Would you like to understand what they are and how to use Visual Studio 2017 to work with them efficiently? Stay sharp since we are now going to explain everything in detail.
Using View Pages
View Pages are used to render results based on actions and for giving responses to HTTP requests. In an MVC approach, they define and encapsulate the visible part of your applications—the presentation layer. Furthermore, they use the .cshtml
file extension and are stored...