【发布时间】:2009-04-29 16:40:45
【问题描述】:
我阅读了this 文章,了解如何在 ruby on rails 中为路由添加前缀。我希望能够用 asp.net mvc 做同样的事情
所以我希望能够定义如下路线:
/photographers/1/photos/2 //photo 2 of photographer with id 1
/photographers/1/photos //all of photographer with id 1
有什么建议吗?
编辑:
"photographers/{id}/photos/{photoID}" - 似乎做得很好,但是我该如何支持
RedirectToAction<PhotosController>(x => x.Add());
我想重定向到:/photographers/1/photos/add
【问题讨论】:
标签: asp.net-mvc routing