ASP.Net MVC4 Root cshtml and “does not inherit from 'System.Web.WebPages.WebPage”

后端 未结 3 1108
花落未央
花落未央 2021-01-04 00:52

I have followed the answers provided by very similar posts as you will see in the step by step listed below.

  • Razor view Type does not inherit from 'Syst

3条回答
  •  孤街浪徒
    2021-01-04 01:19

    Remove the web.config from your Views folder.

    As you're including Partial1.cshtml from that folder, it is also including the web.config from within there. And that web.config is saying that all pages must inherit from WebViewPage.

提交回复
热议问题