Monday, 11 July 2011

Nested Layouts with Razor


I've been spending some time looking into Razor and have started porting some of my MVC2 projects into Razor.

Obviously, the first task I took was to update my master page to utilize the Razor view engine.

My master page consisted of 2 nested master pages:
Site.Master
OneColumn.Master
TwoColumn.Master

To replicate this in razor, I created the following:
_Layout.cshtml
_OneColumn.cshtml
_TwoColumn.Master.cshtml






















No comments:

Post a Comment