当前位置: 首页>>代码示例>>C#>>正文


C# RouteCollection.MapPageRoute方法代码示例

本文整理汇总了C#中RouteCollection.MapPageRoute方法的典型用法代码示例。如果您正苦于以下问题:C# RouteCollection.MapPageRoute方法的具体用法?C# RouteCollection.MapPageRoute怎么用?C# RouteCollection.MapPageRoute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RouteCollection的用法示例。


在下文中一共展示了RouteCollection.MapPageRoute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegisterRoutes

        protected void RegisterRoutes(RouteCollection routes)
        {
            routes.MapPageRoute("Bootstrap",
                "Bootstrap",
                "~/Bootstrap.aspx");

            routes.MapPageRoute("Html5",
                "Html5",
                "~/Html5.aspx");

            routes.MapPageRoute("jQuery",
                "jQuery",
                "~/jQuery.aspx");

            routes.MapPageRoute("Submit",
                "Submit",
                "~/Submit.aspx");

            routes.Add(new Route("Data/GetServerTime", new GetSeverTimeRouteHandler()));
            routes.Add(new Route("Data/LongRunningProcess", new LongRunningProcessRouteHandler()));

            routes.MapPageRoute("Default",
                "",
                "~/Default.aspx");
        }
开发者ID:Zaid-Ajaj,项目名称:Demos,代码行数:25,代码来源:Global.asax.cs

示例2: RegisterRoutes

        void RegisterRoutes(RouteCollection routes)
        {
            routes.MapPageRoute(
                "HomeRoute",
                "Home",
                "~/Default.aspx"
            );
            routes.MapPageRoute(
                "AboutRoute",
                "About",
                "~/About.aspx"
            );
            routes.MapPageRoute(
                "ContactRoute",
                "Contact",
                "~/Contact.aspx"
            );
            routes.MapPageRoute(
                "ProductListRoute",
                "ProductList",
                "~/ProductList.aspx"
            );

            routes.MapPageRoute(
                "ProductsByCategoryRoute",
                "ProductList/{categoryName}",
                "~/ProductList.aspx"
            );
            routes.MapPageRoute(
                "ProductByNameRoute",
                "Product/{productName}",
                "~/ProductDetails.aspx"
            );
        }
开发者ID:nash-pwnage,项目名称:Q-Spy-Shop-Website-Ecommerce,代码行数:34,代码来源:Global.asax.cs

示例3: YonetimRoutes

 void YonetimRoutes(RouteCollection routes)
 {
     routes.MapPageRoute("icerik", "{Sayfa}", "~/page.aspx", true);
     routes.MapPageRoute("alt-icerik", "{Sayfa}/{AltSayfa}", "~/page.aspx", true);
     routes.MapPageRoute("en-alt-icerik", "{Sayfa}/{AltSayfa}/{EnAltSayfa}", "~/page.aspx", true);
     routes.MapPageRoute("link", "{Sayfa}/{AltSayfa}/{EnAltSayfa}/{Icerik}", "~/page.aspx", true);
 }
开发者ID:jqlabpro,项目名称:jqlab_f,代码行数:7,代码来源:Global.asax.cs

示例4: RegisterRoutes

 public static void RegisterRoutes(RouteCollection routes)
 {
     routes.MapPageRoute("Index", "", "~/Pages/Index.aspx");
     routes.MapPageRoute("IndexEditRoute", "kund/{KundID}", "~/Pages/IndexEdit.aspx");
     routes.MapPageRoute("AlbumEditRoute", "album/{AlbumID}", "~/Pages/AlbumEdit.aspx");
     routes.MapPageRoute("Album", "album", "~/Pages/Album.aspx");
 }
开发者ID:jn222na,项目名称:vt14-3-1-individuellt-arbete,代码行数:7,代码来源:RouteConfig.cs

示例5: RegisterRoutes

        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.Ignore("{resource}.axd/{*pathInfo}");

            routes.MapPageRoute(
                "SalesSummaryRoute",
                "SalesReportSummary/{year}",
                "~/SalesSummary.aspx",
                true,
                new RouteValueDictionary { }
            );

            var route = routes.MapPageRoute(
                "SalesRoute",
                "SalesReport/{locale}/{year}",
                "~/Sales.aspx",
                true,
                new RouteValueDictionary { }
            );
            route.RouteHandler = new PageRouteHandler("~/Sales.aspx");

            routes.MapPageRoute(
                "ExpensesRoute",
                "ExpenseReport/{locale}/{year}/{*extraInfo}",
                "~/Expenses.aspx",
                true,
                new RouteValueDictionary { },
                new RouteValueDictionary { { "extraInfo", new CharactersConstraint() } }
            );
        }
开发者ID:gabla5,项目名称:SO-Answers,代码行数:30,代码来源:Global.asax.cs

示例6: RegisterRoutes

 void RegisterRoutes(RouteCollection routes)
 {
     routes.MapPageRoute("", "", "~/WebForm1.aspx");
     routes.MapPageRoute("", "Page2", "~/WebForm2.aspx");
     routes.MapPageRoute("", "Book/{category}", "~/WebForm3.aspx");
     routes.MapPageRoute("404", "{*url}", "~/WebForm1.aspx");  //  PageNotFound.aspx
 }
开发者ID:ShartepStudy,项目名称:WPF,代码行数:7,代码来源:Global.asax.cs

示例7: RegisterRoutes

 public static void RegisterRoutes(RouteCollection routes)
 {
     routes.MapPageRoute(null, "list/{category}/{page}", "~/Pages/Listing.aspx");
     routes.MapPageRoute(null, "list/{page}", "~/Pages/Listing.aspx");
     routes.MapPageRoute(null, "", "~/Pages/Listing.aspx");
     routes.MapPageRoute(null, "list", "~/Pages/Listing.aspx");
 }
开发者ID:cyrilpanicker,项目名称:DotNetReference,代码行数:7,代码来源:RouteConfig.cs

示例8: RegisterRoutes

        private void RegisterRoutes(RouteCollection routes)
        {
            routes.MapPageRoute(
                "generate-flair-basic",
                "Generate/options/{options}/{associationId}.{format}",
                "~/Generate.aspx"
            );

            routes.MapPageRoute(
                "generate-flair-end",
                "Generate/{associationId}.{format}/options/{options}",
                "~/Generate.aspx"
            );

            routes.MapPageRoute(
                "generate-flair-forum-basic",
                "Generate/{associationId}.{format}",
                "~/Generate.aspx"
            );

            routes.MapPageRoute(
                "generate-flair",
                "Generate/{associationId}",
                "~/Generate.aspx"
            );
        }
开发者ID:rchern,项目名称:StackFlair,代码行数:26,代码来源:Global.asax.cs

示例9: RegisterRoutes

        public static void RegisterRoutes(RouteCollection routes)
        {
            var def = new RouteValueDictionary(new { user = "demo" });
            var reg = new RouteValueDictionary(new { user = "\\w+" });

            // Register a route for Page/{User}
            routes.MapPageRoute(
               "user-page", // Route name
               "w/{user}", // Route URL
               "~/Pv.aspx", // Web page to handle route
               true,
               def,
               reg
            );
            // Register a route for Page/{User}
            routes.MapPageRoute(
               "user-card", // Route name
               "c/{user}", // Route URL
               "~/Cv.aspx", // Web page to handle route
               true,
               def,
               reg
            );
            // Register a route for Page/{User}
            routes.MapPageRoute(
               "user-imgs", // Route name
               "p/{user}", // Route URL
               "~/Id.aspx", // Web page to handle route
               true,
               def,
               reg
            );
        }
开发者ID:burstas,项目名称:rmps,代码行数:33,代码来源:Global.asax.cs

示例10: RegisterRoutes

        public static void RegisterRoutes(RouteCollection routes)
        {
            var settings = new FriendlyUrlSettings();
            settings.AutoRedirectMode = RedirectMode.Permanent;
            routes.EnableFriendlyUrls(settings);

            // First parameter: Name of route
            // Second parameter: URL of route {variables}
            // Third parameter: Default values
            // Fourth parameter: Contraints (optional)

            // Profile/username Route
            routes.MapPageRoute("Profile",
            "Account/Profile/{username}",
            "~/Account/Profile/Profile.aspx", true,
            new RouteValueDictionary { 
                { "username", "" } });

            // Profile/username/AccountInfo Route
            routes.MapPageRoute("ProfileAccountDetails",
            "Account/Profile/{username}/{accountDetails}",
            "~/Account/Profile/AccountDetails.aspx", true,
            new RouteValueDictionary { 
                { "username", "" },
                { "accountDetails", "" }});
        }
开发者ID:apawelczyk,项目名称:Sportfare,代码行数:26,代码来源:RouteConfig.cs

示例11: RegisterRoutes

 public static void RegisterRoutes(RouteCollection routes)
 {
     //ignore routes for images,css,js etc
     routes.MapPageRoute("Home", "control/home", "~/Default.aspx");
     routes.MapPageRoute("ProductDetails", "control/products/{id}/details", "~/ViewProducts.aspx");
     routes.MapPageRoute("UpdatePwd", "control/updatepwd", "~/UpdatePwd.aspx");
     routes.MapPageRoute("BrowseCat", "control/browse", "~/BrowseCategories.aspx");
 }
开发者ID:rnramkumar,项目名称:ToAchu,代码行数:8,代码来源:Global.asax.cs

示例12: RegisterRoutes

        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.MapPageRoute("Questions", "questions", "~/Pages/QuestionPages/QuestionList.aspx");
            routes.MapPageRoute("AddQuestion", "questions/new", "~/Pages/QuestionPages/CreateQuestion.aspx");
            routes.MapPageRoute("QuestionDetails", "questions/{id}", "~/Pages/QuestionPages/QuestionDetails.aspx");

            routes.MapPageRoute("Default", "", "~/Pages/Game.aspx");
        }
开发者ID:je222ks,项目名称:IndividuelltMjukvaruutvecklingsprojekt,代码行数:8,代码来源:RouteConfig.cs

示例13: DefineRoutes

        public static void DefineRoutes(RouteCollection routes)
        {
            routes.MapPageRoute("Default", "", "~/Pages/Default.aspx");
            routes.MapPageRoute("UserList", "users/", "~/Pages/Account/UserList.aspx");;
            routes.MapPageRoute("UserAction", "user/{action}/{*id}", "~/Pages/Account/UserForm.aspx");

            //routes.MapPageRoute("Customer", "customer/{id}", "~/Pages/Customer/Index.aspx");
        }
开发者ID:LodewijkSioen,项目名称:Sioen.Layerless,代码行数:8,代码来源:Routing.cs

示例14: RegisterRoutes

 public static void RegisterRoutes(RouteCollection routes)
 {
     routes.MapPageRoute("Default", "Hem", "~/Default.aspx");
     routes.MapPageRoute("GameList", "Spelsammling", "~/GameList.aspx");
     routes.MapPageRoute("Details", "spel/{id}", "~/Details.aspx");
     routes.MapPageRoute("NewGame", "Nytt spel", "~/NewGame.aspx");
     routes.MapPageRoute("NewUSer", "Registrering", "~/Register.aspx");
 }
开发者ID:sslnustudent,项目名称:Projekt,代码行数:8,代码来源:RouteConfig.cs

示例15: RegisterRoutes

 public static void RegisterRoutes(RouteCollection routes)
 {
     routes.EnableFriendlyUrls();
     routes.MapPageRoute("rutaGenCdp", "generarCDP", "~/App/CDP/wf_generarCDP.aspx", false);
     routes.MapPageRoute("rutaVerCdp", "VerCDP", "~/App/CDP/wf_VerCDP.aspx", false);
     routes.MapPageRoute("rutaMantenedorwf_Region", "MantenedorRegion", "~/App/Mantenedores/wf_Regiones.aspx", false);
     routes.MapPageRoute("rutaMantenedrwf_ModeloAtencion", "MantenedorModAtencion", "~/App/Mantenedores/wf_ModeloAtencion.aspx", false);
 }
开发者ID:JonathanEstay,项目名称:Modulo_Financiero,代码行数:8,代码来源:RouteConfig.cs


注:本文中的RouteCollection.MapPageRoute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。