示例#1
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            //routes.MapRoute(
            //    "Default", // Route name
            //    "{controller}/{action}/{id}", // URL with parameters
            //    new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            //);

            //routes.PortalableMapRoute(
            //    "Default", // Route name
            //    "{controller}/{action}/{id}", // URL with parameters
            //    new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            //);
            routes.PortalableMapRoute(
                "AreaDefault", // Route name
                "{area}/{controller}/{action}/{id}", // URL with parameters
                new { area = "Secure", controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );
        }