Try this:
// Sample URL: /Fixtures/Team/id
routes.MapRoute(
"Fixtures-by-TeamID",
"Fixtures/Team/{teamId}",
new { controller = "Fixtures", action = "Team", teamId = -1 }
);
your controller should look like:
public class FixturesController : BaseController // or whatever
{
/*...*/
public ActionResult Team(int teamId)
{
return View("Detail", Team.GetTeamById(teamId)) // or whatever
}
/*...*/
}
And your link would look like
<%= Html.ActionLink("Click here for the team details", "Team", "Fixtures", new { teamId = ViewModel.Data.Id /*orwhateverlol*/ }) %>
(I don't have MVC on this machine so this is all from memory; may have a syntax error or some arguments reversed).
Note your route map's path matches your 1)controller, 2) action 3) argument name. I've found the default action (third argument in MapRoute) works, whereas your overload of that method I've never seen before (may be a holdover from a previous release).
Also observe how your FixturesController matches the path (Fixtures) and the action name matches (Team), and the argument matches as well (teamId).
Lastly, your ActionLink's last argument must match your controller's arguments in name (teamId) and type.
Its a bit too "magical" at this point (there's LOTS of string comparisons going on in the background!). Hopefully this will improve over time. The old Expression style was MUCH MUCH better. You essentially called the method you wished to run, with the values you wished to pass it. I hope they bring that expression style back into the framework. Haack?