In this chapter, you will learn:
1. What is Views in MVC5?
2. How to create View Pages in MVC 5?
1. What is Views in MVC5?
2. How to create View Pages in MVC 5?
In the previous chapter, you learned what the Controller is and How to Create Controller in ASP.NET MVC 5. In this chapter, you will learn about View pages in MVC 5.
Basic Understanding
Views is a folder in MVC structure which contains .cshtml file and design layout which is used in displaying and rendering web pages onto the user’s computers.
The Views folder keeps a separate folder for each controller and each folder keeps different.cshtml pages for all action methods belong to that controller. Views folders name is same as Controllers name and .cshtml pages name same as action methods.
This chapter contains following section to learn:
1. Adding your first View Page
2. Creating Master Layout
3. RenderBody, RenderPage and RenderSection
4. Creating and Adding a Partial View
5. Learn Razor Syntax
6. ViewBag, ViewData and ViewDataDictionary
2. Creating Master Layout
3. RenderBody, RenderPage and RenderSection
4. Creating and Adding a Partial View
5. Learn Razor Syntax
6. ViewBag, ViewData and ViewDataDictionary
In the next chapter, you will start creating your first View Pages in ASP.NET MVC 5.