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


C# AreaRegistrationContext.MapRouteLowercase方法代码示例

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


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

示例1: RegisterArea

        public override void RegisterArea(AreaRegistrationContext context)
        {
            //context.MapRoute(
            //    "wedding_default",
            //    "wedding/{controller}/{action}/{id}",
            //    new { action = "Index", id = UrlParameter.Optional },
            //    new string[] { "Wedding.Areas.wedding.Controllers" }
            //);

            context.MapRouteLowercase(
                "TagName",
                "wedding/Tag/{tagName}",
                new { controller = "Tag", action = "Posts" },
                new string[] { "Wedding.Areas.wedding.Controllers" }
                );

            context.MapRouteLowercase(
                "wedding_default",
                "wedding/{controller}/{action}/{id}",
                new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                new string[] { "Wedding.Areas.wedding.Controllers" }
            );

            //routes.MapRouteLowercase(
            //    "Default", // Route name
            //    "wedding/{controller}/{action}/{id}", // URL with parameters
            //    new { controller = "Home", action = "Index", id = UrlParameter.Optional }, // Parameter defaults
            //    new string[] { "Wedding.Areas.wedding.Controllers" }
            //);
        }
开发者ID:simonneedham,项目名称:Wedding,代码行数:30,代码来源:weddingAreaRegistration.cs

示例2: RegisterArea

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRouteLowercase("Root_En", "en/{action}",
               new { controller = "Home", action = "Index" },
               new { isMethodInHomeController = new RootRouteConstraint<DevRainSolutions.KyivSmartCity.New.Areas.En.Controllers.HomeController>() },
            new[] { "DevRainSolutions.KyivSmartCity.New.Areas.En.Controllers" }
               );

            context.MapRouteLowercase(
                "En_default",
                "En/{controller}/{action}/{id}",
                new { action = "Index", controller="Home", id = UrlParameter.Optional },
                new[] { "DevRainSolutions.KyivSmartCity.New.Areas.En.Controllers" }
            );
        }
开发者ID:DevRainSolutions,项目名称:KyivSmartCity,代码行数:15,代码来源:EnAreaRegistration.cs

示例3: RegisterArea

        public override void RegisterArea( AreaRegistrationContext context )
        {
            context.MapRouteLowercase(
                "Admin_default",
                "Admin/{controller}/{action}/{id}",
                new { area = "Admin", action = "Index", id = UrlParameter.Optional },
                new string[] { "ContentManagementSystem.Admin.Controllers" }
            );

            context.MapRouteLowercase(
                "Admin_Home",
                "Admin/Home",
                new { Area = "Admin", controller = "Home", action = "Index" },
                new string[] { "ContentManagementSystem.Admin.Controllers" }
            );
        }
开发者ID:demonwithin01,项目名称:bg-cms,代码行数:16,代码来源:AdminAreaRegistration.cs

示例4: RegisterArea

 public override void RegisterArea(AreaRegistrationContext context)
 {
     context.MapRouteLowercase(
         "Desktop_default",
         "Desktop/{controller}/{action}/{id}",
         new { action = "Index", id = UrlParameter.Optional }
     );
 }
开发者ID:JefClaes,项目名称:Docary,代码行数:8,代码来源:DesktopAreaRegistration.cs

示例5: RegisterArea

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRouteLowercase(
                name: "Admin_ContestUser",
                url: "admin/contest/userlist/{cid}/{id}",
                defaults: new { controller = "Contest", action = "UserList", id = UrlParameter.Optional },
                constraints: new { cid = @"\d+", id = @"\d+" },
                namespaces: new String[] { "SDNUOJ.Areas.Admin.Controllers" }
            );

            context.MapRouteLowercase(
                name: "Admin_Default",
                url: "admin/{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                namespaces: new String[] { "SDNUOJ.Areas.Admin.Controllers" }
            );
        }
开发者ID:prostickman,项目名称:sdnuoj,代码行数:17,代码来源:AdminAreaRegistration.cs

示例6: RegisterArea

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRouteLowercase(
                name: "Contest_ProblemStatistic",
                url: "contest/{cid}/problem/statistic/{pid}/{id}/{lang}/{order}",
                defaults: new { controller = "Problem", action = "Statistic", id = UrlParameter.Optional, lang = UrlParameter.Optional, order = UrlParameter.Optional },
                constraints: new { cid = @"\d+", pid = @"\d+" },
                namespaces: new String[] { "SDNUOJ.Areas.Contest.Controllers" }
            );

            context.MapRouteLowercase(
                name: "Contest_Default",
                url: "contest/{cid}/{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                constraints: new { cid = @"\d+" },
                namespaces: new String[] { "SDNUOJ.Areas.Contest.Controllers" }
            );
        }
开发者ID:prostickman,项目名称:sdnuoj,代码行数:18,代码来源:ContestAreaRegistration.cs

示例7: RegisterArea

 public override void RegisterArea(AreaRegistrationContext context)
 {
     context.MapRouteLowercase(
         "Hackathon_default",
         "Hackathon/{controller}/{action}/{id}",
         new { action = "Index", controller="Home", id = UrlParameter.Optional },
          new[] { "DevRainSolutions.KyivSmartCity.New.Areas.Hackathon.Controllers" }
     );
 }
开发者ID:DevRainSolutions,项目名称:KyivSmartCity,代码行数:9,代码来源:HachathonAreaRegistration.cs

示例8: RegisterArea

 public override void RegisterArea(AreaRegistrationContext context)
 {
     context.MapRouteLowercase(
         "Admin_default",
         "Admin/{controller}/{action}/{id}",
         new { area = "Admin", controller = "Home", action = "Index", id = UrlParameter.Optional },
         new[] { "Iris.Web.Areas.Admin.Controllers" }
     );
 }
开发者ID:wria7,项目名称:IrisCms,代码行数:9,代码来源:AdminAreaRegistration.cs

示例9: RegisterArea

 public override void RegisterArea(AreaRegistrationContext context)
 {
     context.MapRouteLowercase(
         "Mobile_default",
         "Mobile/{controller}/{action}/{id}",
         new { controller = "Home", action = "Index", id = UrlParameter.Optional },
         new[] { "BreezeShop.Web.Areas.Mobile.Controllers" }
     );
 }
开发者ID:summer-breeze,项目名称:ChengGouHui,代码行数:9,代码来源:MobileAreaRegistration.cs

示例10: RegisterArea

        public override void RegisterArea( AreaRegistrationContext context )
        {
            context.MapRouteLowercase(
                "About",
                "About",
                new { area = "Home", controller = "Home", action = "About" },
                namespaces: new string[] { "ContentManagementSystem.Home.Controllers" }
            );

            context.MapRouteLowercase(
                name: "PageWithId",
                url: "Page/{pageId}",
                defaults: new { area = "Home", controller = "Page", action = "Index", id = UrlParameter.Optional },
                namespaces: new string[] { "ContentManagementSystem.Home.Controllers" }
            );

            //routes.MapRoute(
            //    name: "Default",
            //    url: "{controller}/{action}/{id}",
            //    defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
            //    namespaces: new string[] { "ContentManagementSystem.Controllers" }
            //);

            //context.MapRouteLowercase(
            //    "Default",
            //    "{controller}/{action}/{id}",
            //    new { area = "Home", id = UrlParameter.Optional },
            //    namespaces: new string[] { "ContentManagementSystem.Home.Controllers" }
            //);

            context.MapRouteLowercase(
                "Home_Default",
                "Home/{controller}/{action}/{id}",
                new { area = "Home", id = UrlParameter.Optional },
                namespaces: new string[] { "ContentManagementSystem.Home.Controllers" }
            );

            context.MapRouteLowercase(
                "Home_Page",
                "",
                new { area = "Home", controller = "Home", action = "Index", id = UrlParameter.Optional },
                namespaces: new string[] { "ContentManagementSystem.Home.Controllers" }
            );
        }
开发者ID:demonwithin01,项目名称:bg-cms,代码行数:44,代码来源:HomeAreaRegistration.cs

示例11: RegisterArea

        public override void RegisterArea(AreaRegistrationContext context)
        {
            // URL: /

            context.MapRouteLowercase(
                "Public.Empty",
                string.Empty,
                new { controller = "Home", action = "Index" },
                new[] { ControllerNamespaces.Public }
            );

            // Removes the controller from the URL.
            // URL: /aboutus/

            context.MapRouteLowercase(
                "Public.Action",
                "{action}",
                new { controller = "Home" },
                new[] { ControllerNamespaces.Public }
            );
        }
开发者ID:BernieCook,项目名称:FallenNova,代码行数:21,代码来源:PublicAreaRegistration.cs

示例12: RegisterArea

 public override void RegisterArea(AreaRegistrationContext context)
 {
     context.MapRouteLowercase(
         "Admin_editcategoryroute",
         "Admin/{controller}/{action}/{id}",
         new { controller = "AdminCategory", action = "Index", id = UrlParameter.Optional }
     );
     context.MapRouteLowercase(
         "Admin_edituserroute",
         "Admin/{controller}/{action}/{userId}",
         new { controller = "Admin", action = "Index", userId = UrlParameter.Optional }
     );
     context.MapRouteLowercase(
         "Admin_pagingroute",
         "Admin/{controller}/{action}/{page}",
         new { controller = "Account", action = "Index", page = UrlParameter.Optional }
     );
     context.MapRouteLowercase(
         "Admin_defaultroute",
         "Admin/{controller}/{action}/{id}",
         new { controller = "Admin", action = "Index", id = UrlParameter.Optional }
     );
 }
开发者ID:R3MUSDevPack,项目名称:Forums,代码行数:23,代码来源:AdminAreaRegistration.cs

示例13: RegisterArea

        public override void RegisterArea(AreaRegistrationContext context)
        {
            // URL: /secure/
            // URL: /secure/corp/details/117

            context.MapRouteLowercase(
                RouteNames.Secure.Default,
                RouteUrls.Secure.Default,
                new
                {
                    controller = "Home",
                    action = "Index",
                    id = UrlParameter.Optional
                },
                new[] { ControllerNamespaces.Secure }
            );

            // URL: /secure/corp/1/10/member/true
            // URL: /secure/corp/1/10/member/false
            // URL: /secure/corp/2/50/corporation/false
            // URL: /secure/itemdatabase/1/10/name/true?keywords=vexor >> Html form submissions [GET] aren't aware of MVC routes so will generate a querystring by default. Ambient parameters make no difference.

            context.MapRouteLowercase(
                RouteNames.Secure.Data,
                RouteUrls.Secure.Data,
                new
                {
                    controller = "Home",
                    action = "Index",
                    pageIndex = UrlParameter.Optional,
                    pageSize = UrlParameter.Optional,
                    sortBy = UrlParameter.Optional,
                    sortAscending = UrlParameter.Optional
                },
                new[] { ControllerNamespaces.Secure }
            );
        }
开发者ID:BernieCook,项目名称:FallenNova,代码行数:37,代码来源:SecureAreaRegistration.cs

示例14: RegisterArea

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRouteLowercase(
                "Admin_default",
                "Admin/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional }
                , new[] { "YunShop.Web.Areas.Admin.Controllers" }
            );

            //context.MapRoute(
            //    "Admin_default",
            //    "Admin/{controller}/{action}/{id}",
            //    new {action = "Index", id = UrlParameter.Optional}
            //    , new[] {"YunShop.Web.Areas.Admin.Controllers"}
            //    );
        }
开发者ID:summer-breeze,项目名称:ChengGouHui,代码行数:16,代码来源:AdminAreaRegistration.cs


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