My routes :
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
//Add a custom Route that implements IRouteHandler
Route metadata = new Route("metadata", new MetadataRoute());
routes.Add("Metadata", metadata);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
My view : @Html.ActionLink("Home", "Index", "Home")
The desired client html : href="/"
The actual client html : href="/metadata?action=Index&controller=Home"
Is there a way to get Html.ActionLink to disregard the metadata route?
Thanks