I would like to change my default route values.
Right now, I have:
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
I would like to have: {controller}/{id}/{action}
It is not as simple as changing the value as I have already tried this. How do I approach this?
You will need 2 routes to accomplish this.
Just the rough idea, untested:
And do keep them in this order.
Not totally sure about the signature of the Actions, probably
ActionResult Index(int? id)