结合ASP.Net MVC使用的WebForms [英] Combine ASP.Net MVC with WebForms

查看:167
本文介绍了结合ASP.Net MVC使用的WebForms的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有可能创造一个MVC应用程序根(门户与masterpages和主题),并添加了几个基于子项目(我们已经有一个现成的WebForms应用程序,我们想融入门户网站)的WebForms的?

Would it be 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)?

你会如何集中导航(站点地图,URL路由)?结果
你将如何分享masterpages?结果
你将如何引用资源(〜问题等等)?

How would you centralize navigation (sitemaps, url routing)?
How would you share the masterpages?
How would you refer to resources (~ issues etc.)?

像href=\"http://blogs.msdn.com/webdevtools/archive/2006/07/01/652986.aspx\">这里所描述的似乎有点过时了。

Solutions like the one described here seem somewhat outdated

推荐答案

通过结合MVC Web表单是完全可能的。见<一href=\"http://www.hanselman.com/blog/PlugInHybridsASPNETWebFormsAndASPMVCAndASPNETDynamicDataSideBySide.aspx\">this博客文章由Scott Hanselman在一个介绍。

Combining web forms with MVC is entirely possible. See this blog post by Scott Hanselman for an introduction.


  • 共享母版页:<一href=\"http://stackoverflow.com/questions/841418/is-it-possible-to-share-a-masterpage-between-mvc-and-webforms\">see这个计算器问题

  • 路由:在ASP.Net 4.0,<一个href=\"http://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspx\">routing已经为Web窗体页的路线(scottgu的博客)
  • 启用
  • Sharing master pages: see this StackOverflow question
  • routing: In ASP.Net 4.0, routing has been enabled for web forms page routes (scottgu's blog)

这篇关于结合ASP.Net MVC使用的WebForms的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆