Given the following routing:
routes.MapRoute(
"RouteName", // Route name
"ViewFoo/{FooId}",
new { controller = "Foo", action = "View"}
);
corresponding to the following action method:
public ActionResult View(string fooId = null)
{
...blah...
}
Precisely how would I call Url.Action() to get the string ‘/ViewFoo/4’? Or do I need to modify the routing somehow?
1 Answer