I am trying to get a URL for the following route:
RouteTable.Routes.MapRoute(
null,
"cinema",
new
{
Controller = "CinemaListings",
Action = "ShowCinemaLandingPage",
SiteArea = "CinemaTimes",
MainLandingPage = true
});
I've tried the following methods to produce the URL:
<%:Url.Action("ShowCinemaLandingPage", "CinemaTimes", new { SiteArea = "CinemaTimes", MainLandingPage = true})%>
<%:Url.RouteUrl(new { Controller = "CinemaTimes", Action = "ShowCinemaLandingPage", SiteArea = "CinemaTimes", MainLandingPage = true })%>
I've also tried with only the controller and action names. I get null returned - what am I missing?