Home Cannot access @model in a Razor view located on a folder outside the "~/Views/..."
Reply: 0

Cannot access @model in a Razor view located on a folder outside the "~/Views/..."

Ben Junior
1#
Ben Junior Published in 2018-02-12 16:58:39Z

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.

@inherits System.Web.Mvc.WebViewPage

@model (underline in red)   
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.293179 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO