【发布时间】:2009-02-06 05:32:41
【问题描述】:
我正在尝试实现如下路由:
posts/535434/This-is-a-post-title
posts/tagged/tags+here
// Matches {controller}/{action}/{id} - Default
// Displays all posts with the specified tags
// uses PostsController : ActionTagged(string tags)
posts?pageSize=50&pageIndex=4
// Matches {controller}/{action}/{id} - Default
// Displays all posts
// uses PostsController : Index(int? pageSize, int? pageIndex)
这是我想这样做的问题:
posts/39423/this-is-a-post-title-here
// Typically this is implemented using an action like 'Details'
// and would normally look like : posts/details/5
我似乎无法让路由正常工作。我尝试过这样的事情:
{controller}/{id}/{description}
并将默认操作设置为“显示”,它可以工作,但不允许我导航到其他命名操作,如“标记”。
我错过了什么?
谢谢!
【问题讨论】:
标签: asp.net-mvc routing