In my website, I have the following default route:
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
When I access the Index page from the Home controller, I get the following address:
Everything is okay, however, I would like to add another default route for the following Controller and Page:
http://localhost/MyWebsite/Profile/Index/8
For the link above, I would like to have the following route:
http://localhost/MyWebsite/Profile/8
Without showing the "Index" page name.
How is it possible?