ActionLinkForAreas 链接扩展是否与参数 + 自定义路由一起使用?
我有一条与我的操作相匹配的路线:
routes.MapRoute("Profile", "profile/{artist}/{action}", new {controller="Profile", action="Index"});
但是当我这样调用 ActionLinkForAreas 时:
<%= Html.ActionLinkForAreas<ProfileController>(x => x.Index("DJ"), "DJ") %>
它返回 /profile/?artist=DJ ,因为我希望它返回 /profile/DJ ,因为我的路线已设置。
如果我调用 ActionLink 它会返回正确的 URL,我已经在 Northwind 示例项目中对此进行了测试,并且得到了相同的结果。
我错过了什么吗?