I'm having a problem with my project. I have two routes, the "Default" and a test, but I do not know if it is done correctly because it does not work when they put in the url what I put there, it works only the "Default"
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"TestRoute",
"{id}",
new { controller = "Inicio", action = "Inicio", id = UrlParameter.Optional },
new { id = @"\d+" } //one or more digits only, no alphabetical characters
);
//default route
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Inicio", action = "Inicio", id = UrlParameter.Optional }
);
}