I am trying to pass a parameter in mvc after the controller name
I added
routes.MapRoute(
name: "Product",
url: "Product/{*id}",
defaults: new { controller = "Product", action = "Index", id = UrlParameter.Optional }
);
This did not work
I also tried url: "Product/{id}",
But if i remove the lines above it(the lines below in this post), it is working
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);