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

            routes.RedirectLegacyUrl("Page1.aspx", "~/qstring");

            routes.MapRoute("QStringUrl", "qstring", new {controller = "Qstring", action = "Index"});

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

        }