What is Layout in MVC?

Technology CommunityCategory: ASP.NET MVCWhat is Layout in MVC?
VietMX Staff asked 3 years ago

Layout pages are similar to master pages in traditional web forms. This is used to set the common look across multiple pages. In each child page we can find —

@{
Layout = “~/Views/Shared/TestLayout1.cshtml”;
}

This indicates child page uses TestLayout page as it’s master page.