I have an MVC Action Link:
@Html.ActionLink("Update Information", "Index", "Performance",
new { performanceid = item.PerformanceId }, null)
This action link's href looks like this: /Performance/Index?performanceid=100
In my RouteConfig.cs I have the following routes in the following order:
routes.MapRoute(
"ShowPerformanceOptions",
"Performance/{performanceid}/Index",
new { controller = "Peformance", action = "Index" }
);
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
I do not want a querystring added to the end of the URL, I would instead like the URL to look like this: /Performance/360/Index
I have been through a variety of different options including adding the route parameters and optional url parameters and changing the way I write my ActionLink. Nothing seems to work.
Any ideas anyone?