I am trying to create a routing rule that allows me to use

http://localhost:*****/Profile/2

instead of

http://localhost:*****/Profile/Show/2

to access a page. I currently have a routing rule that successfully removes index when accessing a page. How do I apply the same concept to this?

routes.MapRoute(
    name: "Default",
    url: "{controller}/{action}/{id}",
    defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
    );

Related posts

Recent Viewed