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


C# System.MapRoute方法代码示例

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


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

示例1: RegisterRoutes

        public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
        {
            routes.MapRoute(
                "Curriculum",
                "Curriculum/{CurriculumId}/{action}",
                new { controller = "Curriculum" });

            routes.MapRoute(
                "Curriculums",
                "Curriculum/{action}",
                new { controller = "Curriculum" });

            routes.MapRoute(
                "CurriculumChapter",
                "CurriculumChapter/{CurriculumChapterId}/{action}",
                new { controller = "CurriculumChapter" });

            routes.MapRoute(
                "CurriculumChapters",
                "Curriculum/{CurriculumId}/CurriculumChapter/{action}",
                new { controller = "CurriculumChapter" });

            routes.MapRoute(
                "CurriculumChapterTopic",
                "CurriculumChapterTopic/{CurriculumChapterTopicId}/{action}",
                new { controller = "CurriculumChapterTopic" });

            routes.MapRoute(
                "CurriculumChapterTopics",
                "CurriculumChapter/{CurriculumChapterId}/CurriculumChapterTopic/{action}",
                new { controller = "CurriculumChapterTopic" });
        }
开发者ID:supermuk,项目名称:iudico,代码行数:32,代码来源:CurriculumManagementPlugin.cs

示例2: RegisterArea

        public override void RegisterArea(System.Web.Mvc.AreaRegistrationContext context, IApplicationBus bus)
        {
            base.RegisterArea(context, bus);

            context.MapRoute("Authorization"
                , "Auth/{action}"
                , new { controller = "Auth", action = "Index" });

            context.MapRoute("AuthorizationResources"
                , "AuthResource/{resourceType}/{resourceName}"
                , new { controller = "AuthResource", action = "GetResource" });

            context.MapRoute("EmbeddedOpenIdResources"
                , "EmbededOpenIdResources/{resourceName}"
                , new { controller = "OpenIdResource", action = "GetOpenIdResource" });

            context.MapRoute("OpenIdResources"
                , "OpenIdResources/{resourceType}/{resourceName}"
                , new { controller = "OpenIdResource", action = "GetResource" });

            context.MapRoute(
                "OpenIdDiscover",
                "Auth/Discover"
            );
        }
开发者ID:CoderNumber1,项目名称:Laziton,代码行数:25,代码来源:AuthorizationAreaRegistration.cs

示例3: RegisterRoutes

        public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
        {
            //routes.MapRoute(
            //    "Pipe-Default",
            //    "Pipe/{action}/{id}",
            //    new { controller = "Pipe", action = "Index", id = UrlParameter.Optional },
            //    new { action = "(Detail)", id = new IsLong() },
            //    controllerNamespaces);

            routes.MapRoute(
                "Pipe-Producer-Default",
                "Pipe/Producer/{action}",
                new { controller = "Producer", action = "Index" },
                new { action = "(Index|Add|Create|Update)" },
                controllerNamespaces
            );

            routes.MapRoute(
                "Pipe-Producer-EditDelete",
                "Pipe/Producer/{action}/{id}",
                new { controller = "Producer" },
                new { id = new IsGuid(), action = "(Edit|Delete)" },
                controllerNamespaces
            );
        }
开发者ID:dalinhuang,项目名称:cy-pdcpms,代码行数:25,代码来源:PipeModule.cs

示例4: RegisterArea

        public override void RegisterArea(System.Web.Mvc.AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute("ResourceRoute", "quicklinks/resource/{resourceName}",
                new { controller = "EmbeddedResource", action = "Index" },
                new string[] { "MvcContrib.PortableAreas" });

            context.MapRoute("ResourceImageRoute", "quicklinks/images/{resourceName}",
                new { controller = "EmbeddedResource", action = "Index", resourcePath = "images" },
                new string[] { "MvcContrib.PortableAreas" });

            context.MapRoute("quicklink", "quicklinks/{controller}/{action}",
                new {controller = "links", action = "index"});

            this.RegisterAreaEmbeddedResources();
        }
开发者ID:joaofx,项目名称:mvccontrib,代码行数:15,代码来源:QuickLinksRegistration.cs

示例5: RegisterRoutes

 public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
 {
     routes.MapRoute(
         "Statistics",
         "Stats/{action}",
         new { controller = "Stats", action = "Index" });
 }
开发者ID:supermuk,项目名称:iudico,代码行数:7,代码来源:StatisticsPlugin.cs

示例6: RegisterRoutes

        public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
        {
            routes.MapRoute(
                "Discipline",
                "Discipline/{DisciplineID}/{action}",
                new { controller = "Discipline" });

            routes.MapRoute(
                "DisciplineAction",
                "DisciplineAction/{action}",
                new { controller = "Discipline" });

            routes.MapRoute(
                "Disciplines",
                "Discipline/{action}",
                new { controller = "Discipline", action = "Index" });

            routes.MapRoute(
               "Chapter",
               "Chapter/{ChapterId}/{action}",
                new { controller = "Chapter" });

            routes.MapRoute(
                "Chapters",
                "Discipline/{DisciplineId}/Chapter/{action}",
                new { controller = "Chapter" });

            routes.MapRoute(
               "ChapterAction",
               "ChapterAction/{action}",
                new { controller = "Chapter" });

            routes.MapRoute(
               "Topic",
               "Topic/{TopicId}/{action}",
                new { controller = "Topic" });

            routes.MapRoute(
                "Topics",
                "Chapter/{ChapterId}/Topic/{action}",
                new { controller = "Topic" });

            routes.MapRoute(
               "TopicAction",
               "TopicAction/{action}",
                new { controller = "Topic" });
        }
开发者ID:supermuk,项目名称:iudico,代码行数:47,代码来源:DisciplineManagementPlugin.cs

示例7: RegisterRoutes

        public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
        {
            // Reports
            routes.MapRoute(
                "Reports-Default",
                "Reports/ReportSort/{action}",
                new { controller = "ReportSort" },
                new { action = "(Index|Month|FinishDigger|FinishPipetype|IsNotValid|ReturnInValid|Incoming|DownloadIncoming|Receiving|DownloadReceiving|Detection|DownloadDetection|Send|DownloadSend|Feedingback|DownloadFeedingback|Final|DownloadFinal|Weekly|DownloadWeekly|Monthly|DownloadMonthly|UnValid|DownloadUnValid|NormalSit|DownloadNormalSit|TestSit|DownloadTestSit)" },
                this.controllerNamespaces);

            routes.MapRoute(
               "Reports-Edit",
                "Reports/ReportSort/{action}/{code}",
                new { controller = "ReportSort" },
               new { code = "^[-|a-z|A-Z|0-9]+$", action = "(IsNotValid|ReturnInValid)" },
               this.controllerNamespaces);
        }
开发者ID:dalinhuang,项目名称:cy-pdcpms,代码行数:17,代码来源:ReportsModule.cs

示例8: RegisterRoutes

        public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
        {
            // ReturningNotice
            routes.MapRoute(
                "ReturningNotice-Default",
                "Returning/ReturningNotice/{action}",
                new { controller = "ReturningNotice" },
                new { action = "(Index|Add|Edit|CheckCode|Create|Update|DeleteReturningNotice)" },
                this.controllerNamespaces);

            routes.MapRoute(
                "ReturningNotice-Edit",
                "Returning/ReturningNotice/{action}/{id}",
                new { controller = "ReturningNotice" },
                new { action = "(Detail|Records|UpdateRecords|UpdatePipesState|SendNotice|FindPipe|FindPipes|Edit|Verify|DeleteReturningNotice|GetPipeBySelect|CancleVerify|CancleSend|DownloadDoc)" },
                this.controllerNamespaces);
        }
开发者ID:dalinhuang,项目名称:cy-pdcpms,代码行数:17,代码来源:ReturningModule.cs

示例9: RegisterArea

 public override void RegisterArea(System.Web.Mvc.AreaRegistrationContext context)
 {
     //此路由不能删除
     context.MapRoute("mobile_default",
                      "mob/{controller}/{action}",
                       new { controller = "home", action = "index", area = "mob" },
                       new[] { "BrnShop.Web.Mobile.Controllers" });
 }
开发者ID:JohnsonYuan,项目名称:BrnShop,代码行数:8,代码来源:AreaRegistration.cs

示例10: RegisterRoutes

        public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
        {
            // ReportDetails
            routes.MapRoute(
                "ReportDetail-Default",
                "ReportDetail/ReportDetails/{action}",
                new { controller = "ReportDetails" },
                new { action = "(Index|Add|Create|OneKeyUpdate)" },
                this.controllerNamespaces);

            routes.MapRoute(
               "ReportDetail-Edit",
               "ReportDetail/ReportDetails/{action}/{id}",
               new { controller = "ReportDetails" },
               new { action = "(Detail)" },
               this.controllerNamespaces);
        }
开发者ID:dalinhuang,项目名称:cy-pdcpms,代码行数:17,代码来源:ReportDetailModule.cs

示例11: RegisterRoutes

        public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
        {
            // FileShare
            routes.MapRoute(
                "Front-Default",
                "{action}",
                new { controller = "Index" },
                new { action = "(Index|News|Detail|Search)" },
                this.controllerNamespaces);

            routes.MapRoute(
               "Front-Detail",
               "Front/Index/{action}/{id}",
               new { controller = "Index" },
               new { id = new IsGuid(), action = "(Download)" },
               this.controllerNamespaces);
        }
开发者ID:dalinhuang,项目名称:cy-pdcpms,代码行数:17,代码来源:FrontModule.cs

示例12: RegisterRoutes

 public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
 {
     routes.MapRoute(
         "Search",
         "Search/{action}",
         new { controller = "Search" }
     );
 }
开发者ID:supermuk,项目名称:iudico,代码行数:8,代码来源:SearchPlugin.cs

示例13: RegisterArea

        public override void RegisterArea(System.Web.Mvc.AreaRegistrationContext context)
        {
            context.MapRoute("Blog",
                                "Blog/{controller}/{action}/{id}",
                                new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                                new string[] { "Blog.Controllers" });

            base.RegisterArea(context);
        }
开发者ID:CoderNumber1,项目名称:ContentManagement,代码行数:9,代码来源:BlogAreaRegistration.cs

示例14: RegisterArea

        public override void RegisterArea(System.Web.Mvc.AreaRegistrationContext context)
        {
            context.MapRoute("ContentManagementResources",
                                "ContentMangementTools/Resources/{collectionName}/{resourceType}/{resourceName}",
                                new { controller = "ResourceController", action = "GetResource" },
                                new string[] { "ContentMangementMvc.Controllers" });

            base.RegisterArea(context);
        }
开发者ID:CoderNumber1,项目名称:ContentManagement,代码行数:9,代码来源:ContentManagementAreaRegistration.cs

示例15: RegisterArea

        public override void RegisterArea(System.Web.Mvc.AreaRegistrationContext context)
        {
            //此路由不能删除
            context.MapRoute("storeadmin_default",
                              "storeadmin/{controller}/{action}",
                              new { controller = "home", action = "index", area = "storeadmin" },
                              new[] { "BrnMall.Web.StoreAdmin.Controllers" });

        }
开发者ID:qq550723504,项目名称:zone,代码行数:9,代码来源:AreaRegistration.cs


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