从 ASP.NET WebForms 迁移到 ASP.NET MVC

发布于 2024-08-04 07:11:28 字数 251 浏览 2 评论 0原文

我正在为我工​​作的公司开发一个网络应用程序。我的团队几个月前开始开发该应用程序,并决定使用 ASP.NET WebForms 构建它。现在我们已经开发了相当多的代码,我们想知道 ASP.NET WebForms 是否是一个不错的选择。也许我们应该移民。好的,但是第一步是什么?我们不想从头开始重写一切。我们希望在未来(逐步)在 MVC 中添加新的内容并重写旧的部分。是否有可能以某种方式将 ASP.NET MVC 应用程序添加到当前的 WebForms 应用程序中?他们可以住在一起吗?

I'm developing a web application for a company which I work for. My team started working on the app few months ago and the decision was to build it with ASP.NET WebForms. Now we've quite a lot of the code developed and we're wondering if ASP.NET WebForms was a good choice. Maybe we should migrate. Ok, but what's the first step? We don't want to rewrite everything from scratch. We'd like to add a new stuff in MVC and rewrite the old part in the future (gradually). Is it possible to add somehow ASP.NET MVC application to current WebForms one? Can they live together?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

打小就很酷 2024-08-11 07:11:28

Asp.net webforms 和 MVC 可以愉快地共存。您将添加一些包含和目录,并添加一条路线,这将导致您的网络表单页面被忽略。全部解释如下:

http://www.packtpub .com/article/mixing-asp.net-webforms-and-asp.net-mvc

Asp.net webforms and MVC can live happily together. You will add some includes and directores and add a route which will cause your webforms pages to be ignored. All explained here:

http://www.packtpub.com/article/mixing-asp.net-webforms-and-asp.net-mvc

所有深爱都是秘密 2024-08-11 07:11:28

将 MVC 与 Web 表单混合起来并不是那么困难。基本上,您希望忽略 global.asax 中任何现有的 .aspx 路由,然后为要使用 MVC 构建的新页面添加路由。

有关更多详细信息,请参阅本文

Mixing MVC with webforms is not that all hard. Basically, you want to ignore any exisiting .aspx routes in your global.asax, and then add routes for new pages that you want to build using MVC.

See this article for more details.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文