Inheritance 如何在MVC项目中使用webforms MasterView?

Inheritance 如何在MVC项目中使用webforms MasterView?,inheritance,model-view-controller,view,webforms,Inheritance,Model View Controller,View,Webforms,我在一个解决方案中有两个项目。一个是基于带有MasterView的Web表单,另一方面我有一个MVC项目。我在参考的帮助下将MVC项目与WebForms集成,但问题是我不能将WebForms主视图,即“main.master”与MVC项目视图结合使用。我已经按照一些链接,但没有找到解决办法 我这样做是为了瞄准主页面,但对我来说不起作用 <%@ Page Title="" Language="C#" MasterPageFile="~/ERP_UI/main.Master" Inherits

我在一个解决方案中有两个项目。一个是基于带有MasterView的Web表单,另一方面我有一个MVC项目。我在参考的帮助下将MVC项目与WebForms集成,但问题是我不能将WebForms主视图,即“main.master”与MVC项目视图结合使用。我已经按照一些链接,但没有找到解决办法

我这样做是为了瞄准主页面,但对我来说不起作用

<%@ Page Title="" Language="C#" MasterPageFile="~/ERP_UI/main.Master" Inherits="System.Web.Mvc.ViewPage" %>

在mvc项目中使用WebForms master view有什么解决方案吗?

据我所知,没有好的方法。然而,根据您想要显示的内容,您可以做一些有用的事情。如果你编辑你的答案,指出你想要母版页做什么(例如,只是静态内容,从数据库获取内容等),人们可能会提出一些建议。感谢你的反馈@DaveBarnett,我已经通过将vb母版页转换为普通MVC母版页解决了这个问题。还为动态内容创建了新类。
Type 'ASP.main_master' does not inherit from 'System.Web.WebPages.WebPageBase'.