I have actions
public virtual ActionResult Show(string userId)
and
public virtual ActionResult Show(int groupId)
In Global.asax I have
routes.MapRoute(
"Group_Default",
"{controller}/{action}/{groupId}",
MVC.Groups.Show()
);
routes.MapRoute(
"UserProfile_Default",
"{controller}/{action}/{userId}",
MVC.Profile.Show()
);
Now when I request group/show/..., it works fine. But when I call Profile/Show/..., the parameter is zero. But if I delete UserProfile_Default, then both work, but the profile URL contains a question mark for the parameter (and I want it to be clean, like .../profile/show/5678)
It's seams that somehow one route blocks the other.
source
share