Using ASPX View Engine with MVC 5

2019-01-18 20:12发布

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?

2条回答
爷的心禁止访问
2楼-- · 2019-01-18 20:37

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

  • System.Web.Mvc.WebFormViewEngine
  • System.Web.Mvc.RazorViewEngine
查看更多
我命由我不由天
3楼-- · 2019-01-18 20:50

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

查看更多
登录 后发表回答