本文整理汇总了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" });
}
示例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"
);
}
示例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
);
}
示例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();
}
示例5: RegisterRoutes
public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
{
routes.MapRoute(
"Statistics",
"Stats/{action}",
new { controller = "Stats", action = "Index" });
}
示例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" });
}
示例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);
}
示例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);
}
示例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" });
}
示例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);
}
示例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);
}
示例12: RegisterRoutes
public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
{
routes.MapRoute(
"Search",
"Search/{action}",
new { controller = "Search" }
);
}
示例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);
}
示例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);
}
示例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" });
}