1
在我目前的項目中,我有很多客戶的事情正在進行,所以我想相應地組織它。MVC路由:創建子文件夾
我希望我的控制器如下所示:
/Controllers/Customer/CustomerController.cs
/Controllers/Customer/CustomerResourceController.cs
/Controllers/Customer/CustomerDataFieldController.cs
而我的看法是這樣的:
/Views/Customer/Customer/Index.cshtml
/Views/Customer/CustomerResource/Index.cshtml
/Views/Customer/CustomerDataField/Index.cshtml
我不知道映射這一點,我想的東西之間的這一行:
routes.MapRoute(
"customer_routing",
"Customer/{controller}",
new { controller = "Customer", action = "Index" } // Parameter defaults
);
哪個正確(我認爲)得到我的控制器,但我怎麼映射我的意見合作rrectly?
感謝, 托馬斯
看:http://stackoverflow.com/questions/632964/can-i-specify-a - 自定義搜索的意見,在asp-net-mvc或在這一個:http://stackoverflow.com/questions/6840941/group-mvc3-views-into-sub-folders-under - 主要行動文件夾 – 2013-04-08 09:47:07