Using ASPX View Engine with MVC 5

≡放荡痞女 提交于 2019-12-17 19:33:11

问题


Is it possible to use ASPX view engine with MVC 5?

We have a product using MVC 4 on ASPX view engine and we want to migrate to MVC 5, however, when I create a new project in VS 2013, select MVC and try to add a new View, I don't see any option to add a view using ASPX View Engine. Has Microsoft stopped with ASPX View Engine? Is there any way to still use ASPX?


回答1:


This is what a blog post regarding the release of VS2013 said: "The HTML editor used by Razor files (.cshtml and .vbhtml) as well as normal HTML files has been replaced with entirely new code. Web Forms (.aspx and .ascx) involve significantly more complexity and did not fit into a well-polished release for Visual Studio 2013, so they will be updated in an upcoming product release. " Source:http://blogs.msdn.com/b/webdev/archive/2013/06/27/html-editing-features-in-visual-studio-2013-preview.aspx




回答2:


It's installed by default. just check out the ViewEngines.Engines collection. Its output are:

  • System.Web.Mvc.WebFormViewEngine
  • System.Web.Mvc.RazorViewEngine


来源:https://stackoverflow.com/questions/19696842/using-aspx-view-engine-with-mvc-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!