Here Mudassar Khan has explained with an example, how to use _layout.cshtml in ASP.Net MVC Razor.
The Layout Page (_layout.cshtml) of a View is used in scenario where there are multiple Views and there is some design which needs to be kept common, let’s say Header and Footer.
Basically, Layout Page (_layout.cshtml) shares the common design which is shared among all the Views in the project.
↧