Asp.net MVC Site.master and Razor Switch
I recently converted a project to visual studio 2010 then to mvc 3 and now converting views to razor views.
It's all working fine but I notice i cannot get rid of the site.master and replace it with _layout....
Every time, i start the website the default page is always rendered by site.master even tho I see it calling a controller that uses a view that uses 开发者_如何学Cthe _layout.cshtml
I am wondering if there is at any point anywhere in the file that says the default MasterPage is the site.master ?
Make sure your _ViewStart.cshtml
is pointing to the right masterpage.
@{
Layout = "~/Views/Shared/_Layout.cshtml"
}
Beyond that, if site.master
is not found in ANY of your code (solution wide search). Try restarting your application.
精彩评论