本文整理汇总了C#中RouteCollection.MapRouteSeo方法的典型用法代码示例。如果您正苦于以下问题:C# RouteCollection.MapRouteSeo方法的具体用法?C# RouteCollection.MapRouteSeo怎么用?C# RouteCollection.MapRouteSeo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RouteCollection
的用法示例。
在下文中一共展示了RouteCollection.MapRouteSeo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRouteSeo(
"HomeControllerOmit",
"{action}",
new { controller = "Home", action = "Index" }
);
}
示例2: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });
routes.IgnoreRoute("{*Content}", new { imgs = @"(.*/)?Content(/.*)?" });
routes.IgnoreRoute("{*Scripts}", new { scripts = @"(.*/)?Scripts(/.*)?" });
routes.MapRoute(RouteName.Home, "", MVC.Pages.Home());
routes.MapRouteSeo(
RouteName.InstallerBatchFile, "installChocolatey.cmd", new
{
controller = "Pages",
Action = "InstallerBatchFile"
});
routes.MapRouteSeo(
RouteName.Features, "features", new
{
controller = "Pages",
Action = "Features"
});
routes.MapRouteSeo(
RouteName.About, "about", new
{
controller = "Pages",
Action = "About"
});
routes.MapRouteSeo(
RouteName.Notice, "notice", new
{
controller = "Pages",
Action = "Notice"
});
var pricingRoute = routes.MapRoute(
RouteName.Pricing, "pricing", new
{
controller = "Pages",
Action = "Pricing"
});
routes.Redirect(r => r.MapRoute(RouteName.Compare, "compare")).To(pricingRoute);
routes.MapRouteSeo(
RouteName.Install, "install", new
{
controller = "Pages",
Action = "Install"
});
routes.MapRouteSeo(
RouteName.Business, "business", new
{
controller = "Pages",
Action = "Business"
});
routes.MapRouteSeo(
RouteName.FAQ, "faq", new
{
controller = "Pages",
Action = "FAQ"
});
routes.MapRouteSeo(
RouteName.Kickstarter, "kickstarter", new
{
controller = "Pages",
Action = "Kickstarter"
});
routes.MapRouteSeo(
RouteName.Terms, "terms", new
{
controller = "Pages",
Action = "Terms"
});
routes.MapRouteSeo(
RouteName.Privacy, "privacy", new
{
controller = "Pages",
Action = "Privacy"
});
routes.MapRouteSeo(
RouteName.Media, "media", new
{
controller = "Pages",
Action = "Media"
});
routes.MapRouteSeo(
RouteName.Company, "company", new
{
controller = "Pages",
Action = "Company"
});
//.........这里部分代码省略.........