1

i want to integrate mvc2 into an existing webforms project. to get this work, i found all information online.

now i have the problem that mvc just works when the controller and views folder are placed in the root, but i want to have a specific folder (like 'mvc') so that the controller and views folder are placed like this:

~/mvc/controller

~/mvc/views

is this possible or do i have to use mvc area to solve this issue?!

thanks for your help!

best regards...

4

1 回答 1

0

如果您想将所有 MVC 工作组合在一起,我会使用区域来完成此操作。

我认为可以覆盖视图引擎以将默认根指向不同的文件夹。这在这篇文章中有详细说明。

不过,在这样做之前需要考虑的是,您是否计划最终将您的 WebForms 迁移到 Asp.net MVC 并删除您的 WebForms 工作?如果是这样,您最好将根控制器和视图文件夹保留在项目根目录中。

于 2013-05-06T17:30:22.227 回答