结合 ASP.Net MVC 和 WebForms [英] Combine ASP.Net MVC with WebForms
本文介绍了结合 ASP.Net MVC 和 WebForms的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以创建一个 MVC 根应用程序(带有母版和主题的门户)并添加几个基于 WebForms 的子项目(我们已经有一个我们想要集成到门户的现有 WebForms 应用程序)?
Is it possible to create a MVC root application (Portal with masterpages and themes) and add a couple of WebForms based subprojects (we already have an existing WebForms application that we would like to integrate into the Portal)?
您将如何集中导航(站点地图、网址路由)?
您将如何共享母版页?
您如何引用资源(~问题等)?
How would you centralize navigation (sitemaps, url routing)?
How would you share the masterpages?
How would you refer to resources (~ issues etc.)?
推荐答案
将 Web 表单与 MVC 结合是完全可能的.请参阅这篇由 Scott Hanselman 撰写的博文 以了解介绍.
Combining web forms with MVC is entirely possible. See this blog post by Scott Hanselman for an introduction.
- 共享母版页:请参阅此 StackOverflow问题
- 路由:在 ASP.Net 4.0 中,已为 Web 表单页面路由启用路由(scottgu 的博客)
这篇关于结合 ASP.Net MVC 和 WebForms的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文