26th April 2014
MVC3: Layouts, RenderBody, RenderPage, RenderSection Layouts You typically want to maintain a consistent look and feel across all of the pages within your web-site/application.ASP.NET 2.0 introduced the concept of “master pages” which helps enable this when using .aspx based pages or templates. Razor supports this concept with a feature called “layouts”- which allow us to define a common site template, and then inherit its look and feel across all the views/pages on our site. RenderBody The RenderBody method resides in the layout page. There can only be one RenderBody method per layout page. The RenderBody method indicates where view templates […]