本文整理汇总了C#中RouteCollection.MapNavigationRoute方法的典型用法代码示例。如果您正苦于以下问题:C# RouteCollection.MapNavigationRoute方法的具体用法?C# RouteCollection.MapNavigationRoute怎么用?C# RouteCollection.MapNavigationRoute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RouteCollection
的用法示例。
在下文中一共展示了RouteCollection.MapNavigationRoute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapNavigationRoute<HomeController>("Home", c => c.Index(), "");
routes.MapNavigationRoute<HomeController>("About", c => c.About(), "");
routes.MapNavigationRoute<HomeController>("Contact", c => c.Contact(), "");
/*
//routes.MapNavigationRoute(""
// this enables menu suppression for routes with a FilterToken of "admin" set
// NavigationRoutes.NavigationRoutes.Filters.Add(new AdministrationRouteFilter());
routes.MapNavigationRoute<HomeController>("Automatic Scaffolding", c => c.Index(), "",
new {HasBreakAfter = true});
// this route will only show if users are in the role specified in the AdministrationRouteFilter
// by default, when you run the site, you will not see this. Explore the AdministrationRouteFilter
// class for more information.
routes.MapNavigationRoute<HomeController>("Administration Menu", c => c.Admin(), "",
new { HasBreakAfter = true, FilterToken = "admin"});
routes.MapNavigationRoute<ExampleLayoutsController>("Example Layouts", c => c.Starter())
.AddChildRoute<ExampleLayoutsController>("Marketing", c => c.Marketing())
.AddChildRoute<ExampleLayoutsController>("Fluid", c => c.Fluid(), new NavigationRouteOptions{ HasBreakAfter = true})
.AddChildRoute<ExampleLayoutsController>("Sign In", c => c.SignIn())
;*/
}
示例2: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapNavigationRoute<CoordinatorController>("Create", c => c.Create());
routes.MapNavigationRoute<CoordinatorController>("History", c => c.History(0, 20));
routes.MapNavigationRoute("API", "api", "api");
routes.MapNavigationRoute<HomeController>("Configuration", c => c.Configuration());
}
示例3: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
// this enables menu suppression for routes with a FilterToken of "admin" set
NavigationRouteFilters.Filters.Add(new AdministrationRouteFilter());
routes.MapNavigationRoute<HomeController>("Automatic Scaffolding", c => c.Index(), "", new NavigationRouteOptions {HasBreakAfter = true});
// this route will only show if users are in the role specified in the AdministrationRouteFilter
// by default, when you run the site, you will not see this. Explore the AdministrationRouteFilter
// class for more information.
routes.MapNavigationRoute<HomeController>("Administration Menu", c => c.Admin(), "", new NavigationRouteOptions { HasBreakAfter = true, FilterToken = "admin"});
routes.MapNavigationRoute<ExampleLayoutsController>("Bootstrap Layouts", c => c.Null())
.AddChildRoute<ExampleLayoutsController>("Marketing", c => c.Marketing())
.AddChildRoute<ExampleLayoutsController>("Fluid", c => c.Fluid(), new NavigationRouteOptions{ HasBreakAfter = true})
.AddChildRoute<ExampleLayoutsController>("Sign In", c => c.SignIn());
routes.MapNavigationRoute<GridController>("JS Grids", c => c.Null())
.AddChildRoute<GridController>("jqGrid", c => c.JQGrid())
.AddChildRoute<GridController>("DataTables", c => c.DataTable())
.AddChildRoute<GridController>("SlickGrid", c => c.SlickGrid());
routes.MapNavigationRoute<FrameworkController>("JS Frameworks", c => c.Null())
.AddChildRoute<FrameworkController>("AngularJS", c => c.AngularJS())
.AddChildRoute<FrameworkController>("KnockoutJS", c => c.KnockoutJS());
}
示例4: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
//routes.MapNavigationRoute<ExampleLayoutsController>("Bootstrap Layouts", c => c.Starter())
// .AddChildRoute<ExampleLayoutsController>("Marketing", c => c.Marketing())
// .AddChildRoute<ExampleLayoutsController>("Fluid", c => c.Fluid())
// .AddChildRoute<ExampleLayoutsController>("Sign In", c => c.SignIn())
// ;
//routes.MapNavigationRoute<HomeController>("Home", c => c.Index())
// .AddChildRoute<AccountController>("Sign In", c => c.Login("home/index"))
// .AddChildRoute<HomeController>("About", c => c.About())
// ;
//routes.MapNavigationRoute<HomeController>("Manage", c => c.Index())
// .AddChildRoute<ChannelsController>("Channels", c => c.Index())
// .AddChildRoute<BroadcastsController>("Broadcasts", c => c.Index());
routes.MapNavigationRoute<BroadcastsController>("My Broadcasts", c => c.IndexMy());
routes.MapNavigationRoute<ChannelsController>("Channels", c => c.Index());
routes.MapNavigationRoute<BroadcastsController>("Broadcasts", c => c.Index());
routes.MapNavigationRoute<UserInfoesController>("Users", c => c.Index());
}
示例5: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapNavigationRoute("Home", "", new {controller = "Home", action = "Index"});
routes.MapNavigationRoute("About", "about", new {controller = "Home", action = "About"});
routes.MapNavigationRoute("Contact", "contact", new {controller = "Home", action = "Contact"});
}
示例6: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapNavigationRoute<HomeController>("Home", c => c.Index());
routes.MapNavigationRoute<PersonController>("People", c => c.Null())
.AddChildRoute<PersonController>("View All", c => c.Index())
.AddChildRoute<PersonController>("Create New", c => c.Create());
}
示例7: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapNavigationRoute<HomeController>("Home", c => c.Index());
routes.MapNavigationRoute<AdminController>("Admin", c => c.Details(Guid.NewGuid()))
.AddChildRoute<AdminController>("List Recipes", c => c.Index())
.AddChildRoute<AdminController>("Create Recipe", c => c.Create(null));
}
示例8: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapNavigationRoute<DiskController>("My Disk", c => c.Index());
routes.MapNavigationRoute<AccountController>("Profile", c => c.Index())
.AddChildRoute<AccountController>("Sign Out", c => c.LogOut())
;
}
示例9: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapNavigationRoute<HomeController>("Best Days", c => c.BestDays());
routes.MapNavigationRoute<HomeController>("Cities", c => c.Cities());
routes.MapNavigationRoute<HomeController>("Mobile", c => c.TopLocal());
routes.MapNavigationRoute<HomeController>("Blog", c => c.Contact());
routes.MapNavigationRoute<HomeController>("Team", c => c.About());
}
示例10: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapNavigationRoute("Blog-navigation", "Blog", "blog", new { controller = "Blog", action = "Index" });
foreach (var pageMetadata in PagesMetadata.Instance.List)
{
routes.MapNavigationRoute("Page-navigation-" + pageMetadata.Slug, pageMetadata.Title, pageMetadata.Slug, new { controller = "Page", action = "GetPage" });
}
}
示例11: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapNavigationRoute<HomeController>("Automatic Scaffolding", c => c.Index());
routes.MapNavigationRoute<ExampleLayoutsController>("Example Layouts", c => c.Starter())
.AddChildRoute<ExampleLayoutsController>("Marketing", c => c.Marketing())
.AddChildRoute<ExampleLayoutsController>("Fluid", c => c.Fluid())
.AddChildRoute<ExampleLayoutsController>("Sign In", c => c.SignIn())
;
}
示例12: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapNavigationRoute<SmsAndEmailController>("Create", c => c.Create());
routes.MapNavigationRoute<CoordinatorController>("History", c => c.History(0, 20));
// routes.MapNavigationRoute<CoordinatorController>("Create", c => c.Create());
// routes.MapNavigationRoute<CoordinatorController>("History", c => c.History(0, 20));
routes.MapNavigationRoute("API", "api", "api");
routes.MapNavigationRoute<CommunicationTemplateController>("Templates", c => c.Index());
routes.MapNavigationRoute<HomeController>("Configuration", c => c.Configuration());
}
示例13: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapNavigationRoute<HomeController>("首页", c => c.Index());
routes.MapNavigationRoute<ExampleLayoutsController>("Admin", c => c.Starter())
.AddChildRoute<UserController>("个人设置", c => c.Setting())
.AddChildRoute<UserController>("密码修改", c => c.Password())
.AddChildRoute<UserController>("退出登录", c => c.LogOff())
;
}
示例14: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapNavigationRoute<AccountController>("Inicio", c => c.LogIn());
routes.MapNavigationRoute<ExampleLayoutsController>("Perfil", c => c.Starter())
.AddChildRoute<DiskController>("Lista Archivos", c => c.ListAllContent())
.AddChildRoute<AccountController>("Editar Perfil", c => c.UpdateProfile())
.AddChildRoute<AccountController>("Referral a friend", c => c.Referral())
;
}
示例15: RegisterRoutes
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapNavigationRoute<HomeController>("Home Dashboard", c => c.Index());
routes.MapNavigationRoute<RenterController>("Tenants", c => c.Index());
routes.MapNavigationRoute<ExampleLayoutsController>("Example Layouts", c => c.Starter())
.AddChildRoute<ExampleLayoutsController>("Marketing", c => c.Marketing())
.AddChildRoute<ExampleLayoutsController>("Fluid", c => c.Fluid())
.AddChildRoute<ExampleLayoutsController>("Sign In", c => c.SignIn())
;
}