/// <summary> /// Registers the routes. /// </summary> /// <param name="routes">The routes.</param> public static void RegisterRoutes(RouteCollection routes) { routes.AddCombresRoute("Combres"); routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapLocalizeRoute( name: "DefaultShortCUltureSpecific", url: "{culture}/{controller}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }, constraints: new { culture = LocaleHelper.SupportedCulturesRegex, id = @"\d+" }); routes.MapRouteToLocalizeRedirect( name: "DefaultShort", url: "{controller}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }, constraints: new { id = @"\d+" }); routes.MapLocalizeRoute( name: "DefaultCultureSpecific", url: "{culture}/{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }, constraints: new { culture = LocaleHelper.SupportedCulturesRegex }); routes.MapRouteToLocalizeRedirect( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }); }
public static void RegisterRoutes(RouteCollection routes) { routes.AddCombresRoute("Combres"); routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); }
public static void RegisterRoutes(RouteCollection routes) { routes.AddCombresRoute("Combres"); routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); }
public static void RegisterRoutes(RouteCollection routes) { //combres routes.AddCombresRoute("Combres"); routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Account", action = "LogOn", id = UrlParameter.Optional } // Parameter defaults ); }
public static void RegisterRoutes(RouteCollection routes) { //Register Combres routes.AddCombresRoute("Combres Route"); routes.RouteExistingFiles = true; routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("Content/{*pathInfo}"); routes.IgnoreRoute("Scripts/{*pathInfo}"); routes.IgnoreRoute("App/{WebPage}.aspx/{*pathInfo}"); routes.IgnoreRoute("App/{Resource}.ashx/{*pathInfo}"); routes.IgnoreRoute("ajaxpro/{ajax}.ashx/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); }