Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 the _layout.cshtml

I am wondering if there is at any point anywhere in the file that says the default MasterPage is the site.master ?

like image 615
Reza M. Avatar asked Oct 11 '22 06:10

Reza M.


1 Answers

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.

like image 190
Chase Florell Avatar answered Oct 20 '22 15:10

Chase Florell