Cannot access @model in a Razor view located on a folder outside the "~/Views/..."
user45595 Published in September 20, 2018, 4:35 pm
In the VS2017 project, I had to create a view outside the "~/Views/..." folder and I added the "@inherits System.Web.Mvc.WebViewPage" . It works but after I added a model, it says "The name model does not exist in the current context. Bellow is the view code. My question is if there is a solution or do I have to move it back to the default folder, which will be another problem, since it is a client's specific view and there are several different clients.
@model (underline in red)
c# asp.net-mvc razor
share|improve this question
edited Feb 12 at 17:04
asked Feb 12 at 16:58
Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.
Browse other questions tagged c# asp.net-mvc razor or ask your own question.