MVC routing problems - url generation
- by roncansan
Hi,
I what to create a url that looks like website.com/sea/season/23/team
Here is the MapRoute
routes.MapRoute(
"SeaTeam",
"sea/season/{seasonId}/team/{action}/{name}",
new { controller = "Team", action = "Index", name = UrlParameter.Optional}
);
The Html.ActionLink looks like
@Html.ActionLink("Add Team", "Index", "SeaTeam", new { seasonId = seasons.id }, null)
But its generating the following url
<a href="/SeaTeam?seasonId=1">Add Team</a>
Any insights? Thanks...