【发布时间】:2012-04-11 22:00:57
【问题描述】:
我正在开发一个 MVC 3 Web 应用程序,我想创建这样的东西:
/Controller
/Blog
BogController.cs
ViewsController.cs
ArticlesController.cs
/Customers
SalesController.cs
ProductsController.cs
HomeController.cs
/Views
/Blog
Index.aspx
Summary.aspx
/Views
Index.aspx
Admin.aspx
Show.aspx
/Articles
Show.aspx
Admin.aspx
/Customers
/Sales
Index.aspx
Totals.aspx
/Products
Index.aspx
Promotions.aspx
/Home
Index.aspx
Create sub folders in the controller
但是在他们回答这个人的解决方案中是针对 MVC 2 而在 MVC 3 中,属性 MapAreas 没有退出(或者至少在我看来没有)
那么我可以做些什么来构建像 /Admin/Users/EditUser?id=2 这样的结构?
如果我需要创建路由规则,你能给我写一个如何做的例子吗?
【问题讨论】:
标签: .net asp.net-mvc asp.net-mvc-routing directory-structure