For those of you following the MVC releases, you will see something new in your File->New for MVC3 RC: _ViewStart.cshtml (_ViewStart.vbhtml for you VBers). This is a common place to dry out view dependencies. The most common view dependency is the MasterView it will use. To that end, the default _ViewStart page you get from a File->New MVC3 project has just the:

   1: @{
   2:     Layout = "~/Views/Shared/_Layout.cshtml";
   3: }

This seems to be done by convention. The view must be named “_viewstart.cshtml” or it will not be used. It also does not apply to partial views (since they are not really a page).

Hope this helps,

Lee

posted on Saturday, November 13, 2010 2:51 PM | Filed Under [ MVC Learning Software ASP.NET ]

Comments

No comments posted yet.
Post Comment
Title *
Name *
Email
Url
Comment *