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


C# RouteCollection.MapReportingRoute方法代码示例

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


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

示例1: RegisterRoutes

 public static void RegisterRoutes(RouteCollection routes)
 {
     routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
     routes.MapReportingRoute();
     routes.MapRoute(
         "Default", // Route name
         "{controller}/{action}/{id}", // URL with parameters
         new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
     );
 }
开发者ID:mharen,项目名称:service-tracker,代码行数:10,代码来源:Global.asax.cs

示例2: RegisterRoutes

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

            routes.MapRoute(
                "Admin_elmah",
                "Admin/elmah/{type}",
                new { action = "Index", controller = "Elmah", type = UrlParameter.Optional }
            );
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
开发者ID:spc-ofp,项目名称:Vms-Tufman-Recon,代码行数:16,代码来源:RouteConfig.cs

示例3: RegisterRoutes

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

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

            routes.MapRoute(
               name: "404-PageNotFound",
               // This will handle any non-existing urls
               url: "{*url}",
               // "Shared" is the name of your error controller, and "Error" is the action/page
               // that handles all your custom errors
               defaults: new { controller = "Shared", action = "Error" }
               );
        }
开发者ID:ongeri,项目名称:citieuc,代码行数:20,代码来源:RouteConfig.cs

示例4: RegisterRoutes

        /// <summary>
        /// Register MVC routes in the application.
        /// </summary>
        /// <param name="routes">Existing application route collection.</param>
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.MapReportingRoute(); // For DoddleReports

            routes.MapRoute(
                name: MyOpenTrips,
                url: "Trip/MyOpenTrips",
                defaults: new { controller = "Trip", action = "MyOpenTrips" }
            );

            routes.MapRoute(
                name: MyTrips,
                url: "Trip/MyTrips",
                defaults: new { controller = "Trip", action = "MyTrips" }
            );

            routes.MapRoute(
                name: CreateTrip,
                url: "Trip/Create",
                defaults: new { controller = "Trip", action = "Create" }
            );

            // I'm fairly certain that the DoddleReports installer fiddled web.config
            // so that routes that include a file extension get routed through MVC
            routes.MapRoute(
                name: TrackWithExtension,
                url: "Trip/{tripId}/track.{extension}",
                defaults: new { controller = "Map", action = "Track" },
                constraints: new { tripId = IsPositiveInteger, extension = IsMappingExtension }
            );

            routes.MapRoute(
                name: PositionsWithExtension,
                url: "Trip/{tripId}/positions.{extension}",
                defaults: new { controller = "Map", action = "Positions" },
                constraints: new { tripId = IsPositiveInteger, extension = IsMappingExtension }
            );

            // For this one, we can set a default extension, preferring compression for what
            // is likely to be a large file.
            routes.MapRoute(
                name: FullTripKml,
                url: "Trip/{tripId}/full_trip.{extension}",
                defaults: new { controller = "Map", action = "AllData", extension = "kmz" },
                constraints: new { tripId = IsPositiveInteger, extension = IsMappingExtension }
            );

            routes.MapRoute(
                name: TripMap,
                url: "Trip/{tripId}/Map",
                defaults: new { controller = "Map", action = "Index" },
                constraints: new { tripId = IsPositiveInteger }
            );

            routes.MapRoute(
                name: Electronics,
                url: "Trip/{tripId}/Electronics/{action}",
                defaults: new { controller = "Electronics", action = "Index" },
                constraints: new { tripId = IsPositiveInteger }
            );

            routes.MapRoute(
                name: Crew,
                url: "Trip/{tripId}/Crew/{action}",
                defaults: new { controller = "Crew", action = "Index" },
                constraints: new { tripId = IsPositiveInteger }
            );

            routes.MapRoute(
                name: Ps1,
                url: "Trip/{tripId}/PS-1/{action}",
                defaults: new { controller = "Ps1", action = "Index" },
                constraints: new { tripId = IsPositiveInteger }
            );

            routes.MapRoute(
                name: TripInfo,
                url: "Trip/{tripId}/LL-1/{action}",
                defaults: new { controller = "TripInfo", action = "Index" },
                constraints: new { tripId = IsPositiveInteger }
            );

            routes.MapRoute(
                name: Gen1Sightings,
                url: "Trip/{tripId}/Sightings",
                defaults: new { controller = "Gen1", action = "Sightings" },
                constraints: new { tripId = IsPositiveInteger }
            );

            routes.MapRoute(
                name: EditGen1Sightings,
                url: "Trip/{tripId}/Sightings/Edit",
                defaults: new { controller = "Gen1", action = "EditSightings" },
                constraints: new { tripId = IsPositiveInteger }
//.........这里部分代码省略.........
开发者ID:spc-ofp,项目名称:tubs-web,代码行数:101,代码来源:RouteConfig.cs


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