I'm trying to build the following route:
routes.MapRoute(
name: "StaticPage",
url: "guide/{destination}/{controller}/{action}",
defaults: new { controller = "Home", action = "Index", destination = UrlParameter.Optional }
);
My controller is as follows:
public class FlightsController : Controller
{
public ActionResult Index(string destination= null, string origin=null)
{
// some code here
}
}
I want to browse to this address--> www.somewebsite.com/guide/austria/flights
and reach my action Index (flight/index), with destination=austria
Is it possible? and how? the method I tried doesn't work :/