I have a route that looks like this (but I've tried a few different ones):
routes.MapRoute(
"Metrics",
"Metrics/{action}/{id}/{resource}/{period}",
new { controller = "Metrics" }
);
On the MetricsController
I have the following actions:
// Index sets up our UI
public ActionResult Index(int id, string resource, string period)
// GetMetrics returns json consumed by ajax graphing tool
public JsonResult GetMetrics(int id, string resource, string period)
How do I generate links and not have Index
in the url so that I can do this?:
/Metrics/1234/cpu-0/10m -> MetricsController.Index(id, string resource, string period) /Metrics/GetMetrics/1234/cpu-0/10m -> MetricsController.GetMetrics(int id, string resource, string period)
I've tried all sorts of incantations of Html.ActionLink
and Html.RouteLink
but with no joy.