ASP.NET MVC GetTypeHashCode() no suitable method found to override

问题错误信息:

Error Message: c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\296bde83\3fd88bdf\App_Web_create.aspx.1486a709.vkhqok-s.0.cs(291): error CS0115: 'ASP.views_mycontroller_create_aspx.GetTypeHashCode()': no suitable method found to override

经过分析,是在View阶段发生的问题。原因是将View的继承类类型弄错了。

ascx View:Inherits="System.Web.Mvc.ViewUserControl<Model.EditorViewModel>"

aspx View: Inherits="System.Web.Mvc.ViewPage<Model.EditorViewModel>"


原文地址:https://www.cnblogs.com/jacobz/p/2081357.html