answerstu

Why do ASP.NET MVC3 Areas and Razor Views produce this error?

The view at '~/Areas/SomeArea/Views/List/Index.cshtml' must derive from ViewPage, ViewPage, ViewUserControl, or ViewUserControl.The project structure is pretty much default. There is one area called SomeArea. It has a single controller called List. It does nothing except:public ActionResult Index(){ return View("~/Areas/SomeArea/Views/List/Index.cshtml");}The view looks like:@inherits System.Web.Mvc.WebViewPage<dynamic>@{ View.Title = "Index"; LayoutPage = "~/Views/Shared/_Layout.cshtml";}<h2>Index</h2>I have tried emp...Read more