Reputation: 21007
I have an MVC4 web application that i'm adjusting. Currently a controller loads Index.cshtml
. In that file i have the following line:
@{
Layout = "~/Views/Shared/_Layout-DoubleColumn.cshtml";
}
So i changed that line to:
@{
Layout = "~/Views/Shared/_Layout-TripleColumn.cshtml";
}
I also copied to _Layout-DoubleColumn.cshtml
file and renamed that to _Layout-TripleColumn.cshtml
.
Now when i run the application i get the following error message:
The layout page "~/Views/Shared/_Layout-TripleColumn.cshtml" could not be found at the following path: "~/Views/Shared/_Layout-TripleColumn.cshtml"
I have no clue what the problem could be, because i'm sure that the file is in the Shared
folder...
Anyone any idea what the problem could be?
Upvotes: 2
Views: 4996
Reputation: 151584
Make sure the Build Action of the file is set to Content in the properties of the View.
Upvotes: 3