简体   繁体   English

没有ASP.NET的ASP.NET MVC?

[英]ASP.NET MVC without ASP.NET?

As far as I know, ASP.NET MVC leverages a lot of the features of ASP.NET Web Forms, one of these services is how to get the Html response from the template .aspx file (the view). 据我所知,ASP.NET MVC利用了ASP.NET Web Forms的许多功能,其中一个服务是如何从模板.aspx文件(视图)中获取Html响应。 Can asp.net mvc leverages any other platform to generate html over template files (something like PHP for example)? asp.net mvc可以利用任何其他平台生成模板文件的html(例如PHP之类的东西)吗?

EDIT: There is NO use case for this, just curiosity! 编辑:这没有用例,只是好奇心!

Yes, it can! 是的,它可以! The aspx model is just one of the view template mechanisms. aspx模型只是视图模板机制之一。 There are others - you can even write your own. 还有其他人 - 你甚至可以自己写。 The key here is IViewEngine , with WebFormViewEngine being the aspx/ascx provider. 这里的关键是IViewEngineWebFormViewEngine是aspx / ascx提供者。 ASP.NET MVC In Action covers some of this in chapter 6 "Customizing & Extending the ASP.NET MVC Framework". ASP.NET MVC In Action在第6章“自定义和扩展ASP.NET MVC框架”中介绍了其中的一些内容。

you can use other ViewEngines 你可以使用其他ViewEngines

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM