Exemplo n.º 1
0
        /// <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 });
        }
Exemplo n.º 2
0
 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
     );
 }
Exemplo n.º 3
0
 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
         );
 }
Exemplo n.º 4
0
        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
            );
        }
Exemplo n.º 5
0
        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 }
                );
        }