I need to call the client profile page, for example, "(www.mysite.com/John) or (www.mysite.com/customer name)"
so I added a route to be like that
routes.MapRoute(
name: "Profile",
url: "{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
but it always goes to the first route, as if I need to open some kind of controller, it doesnβt work any tips?
Thank.
source
share