本文整理汇总了C#中System.Web.Mvc.AreaRegistrationContext.MapRouteLowercase方法的典型用法代码示例。如果您正苦于以下问题:C# AreaRegistrationContext.MapRouteLowercase方法的具体用法?C# AreaRegistrationContext.MapRouteLowercase怎么用?C# AreaRegistrationContext.MapRouteLowercase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.Mvc.AreaRegistrationContext
的用法示例。
在下文中一共展示了AreaRegistrationContext.MapRouteLowercase方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
//context.MapRoute(
// "wedding_default",
// "wedding/{controller}/{action}/{id}",
// new { action = "Index", id = UrlParameter.Optional },
// new string[] { "Wedding.Areas.wedding.Controllers" }
//);
context.MapRouteLowercase(
"TagName",
"wedding/Tag/{tagName}",
new { controller = "Tag", action = "Posts" },
new string[] { "Wedding.Areas.wedding.Controllers" }
);
context.MapRouteLowercase(
"wedding_default",
"wedding/{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional },
new string[] { "Wedding.Areas.wedding.Controllers" }
);
//routes.MapRouteLowercase(
// "Default", // Route name
// "wedding/{controller}/{action}/{id}", // URL with parameters
// new { controller = "Home", action = "Index", id = UrlParameter.Optional }, // Parameter defaults
// new string[] { "Wedding.Areas.wedding.Controllers" }
//);
}
示例2: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRouteLowercase("Root_En", "en/{action}",
new { controller = "Home", action = "Index" },
new { isMethodInHomeController = new RootRouteConstraint<DevRainSolutions.KyivSmartCity.New.Areas.En.Controllers.HomeController>() },
new[] { "DevRainSolutions.KyivSmartCity.New.Areas.En.Controllers" }
);
context.MapRouteLowercase(
"En_default",
"En/{controller}/{action}/{id}",
new { action = "Index", controller="Home", id = UrlParameter.Optional },
new[] { "DevRainSolutions.KyivSmartCity.New.Areas.En.Controllers" }
);
}
示例3: RegisterArea
public override void RegisterArea( AreaRegistrationContext context )
{
context.MapRouteLowercase(
"Admin_default",
"Admin/{controller}/{action}/{id}",
new { area = "Admin", action = "Index", id = UrlParameter.Optional },
new string[] { "ContentManagementSystem.Admin.Controllers" }
);
context.MapRouteLowercase(
"Admin_Home",
"Admin/Home",
new { Area = "Admin", controller = "Home", action = "Index" },
new string[] { "ContentManagementSystem.Admin.Controllers" }
);
}
示例4: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRouteLowercase(
"Desktop_default",
"Desktop/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional }
);
}
示例5: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRouteLowercase(
name: "Admin_ContestUser",
url: "admin/contest/userlist/{cid}/{id}",
defaults: new { controller = "Contest", action = "UserList", id = UrlParameter.Optional },
constraints: new { cid = @"\d+", id = @"\d+" },
namespaces: new String[] { "SDNUOJ.Areas.Admin.Controllers" }
);
context.MapRouteLowercase(
name: "Admin_Default",
url: "admin/{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
namespaces: new String[] { "SDNUOJ.Areas.Admin.Controllers" }
);
}
示例6: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRouteLowercase(
name: "Contest_ProblemStatistic",
url: "contest/{cid}/problem/statistic/{pid}/{id}/{lang}/{order}",
defaults: new { controller = "Problem", action = "Statistic", id = UrlParameter.Optional, lang = UrlParameter.Optional, order = UrlParameter.Optional },
constraints: new { cid = @"\d+", pid = @"\d+" },
namespaces: new String[] { "SDNUOJ.Areas.Contest.Controllers" }
);
context.MapRouteLowercase(
name: "Contest_Default",
url: "contest/{cid}/{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
constraints: new { cid = @"\d+" },
namespaces: new String[] { "SDNUOJ.Areas.Contest.Controllers" }
);
}
示例7: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRouteLowercase(
"Hackathon_default",
"Hackathon/{controller}/{action}/{id}",
new { action = "Index", controller="Home", id = UrlParameter.Optional },
new[] { "DevRainSolutions.KyivSmartCity.New.Areas.Hackathon.Controllers" }
);
}
示例8: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRouteLowercase(
"Admin_default",
"Admin/{controller}/{action}/{id}",
new { area = "Admin", controller = "Home", action = "Index", id = UrlParameter.Optional },
new[] { "Iris.Web.Areas.Admin.Controllers" }
);
}
示例9: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRouteLowercase(
"Mobile_default",
"Mobile/{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional },
new[] { "BreezeShop.Web.Areas.Mobile.Controllers" }
);
}
示例10: RegisterArea
public override void RegisterArea( AreaRegistrationContext context )
{
context.MapRouteLowercase(
"About",
"About",
new { area = "Home", controller = "Home", action = "About" },
namespaces: new string[] { "ContentManagementSystem.Home.Controllers" }
);
context.MapRouteLowercase(
name: "PageWithId",
url: "Page/{pageId}",
defaults: new { area = "Home", controller = "Page", action = "Index", id = UrlParameter.Optional },
namespaces: new string[] { "ContentManagementSystem.Home.Controllers" }
);
//routes.MapRoute(
// name: "Default",
// url: "{controller}/{action}/{id}",
// defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
// namespaces: new string[] { "ContentManagementSystem.Controllers" }
//);
//context.MapRouteLowercase(
// "Default",
// "{controller}/{action}/{id}",
// new { area = "Home", id = UrlParameter.Optional },
// namespaces: new string[] { "ContentManagementSystem.Home.Controllers" }
//);
context.MapRouteLowercase(
"Home_Default",
"Home/{controller}/{action}/{id}",
new { area = "Home", id = UrlParameter.Optional },
namespaces: new string[] { "ContentManagementSystem.Home.Controllers" }
);
context.MapRouteLowercase(
"Home_Page",
"",
new { area = "Home", controller = "Home", action = "Index", id = UrlParameter.Optional },
namespaces: new string[] { "ContentManagementSystem.Home.Controllers" }
);
}
示例11: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
// URL: /
context.MapRouteLowercase(
"Public.Empty",
string.Empty,
new { controller = "Home", action = "Index" },
new[] { ControllerNamespaces.Public }
);
// Removes the controller from the URL.
// URL: /aboutus/
context.MapRouteLowercase(
"Public.Action",
"{action}",
new { controller = "Home" },
new[] { ControllerNamespaces.Public }
);
}
示例12: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRouteLowercase(
"Admin_editcategoryroute",
"Admin/{controller}/{action}/{id}",
new { controller = "AdminCategory", action = "Index", id = UrlParameter.Optional }
);
context.MapRouteLowercase(
"Admin_edituserroute",
"Admin/{controller}/{action}/{userId}",
new { controller = "Admin", action = "Index", userId = UrlParameter.Optional }
);
context.MapRouteLowercase(
"Admin_pagingroute",
"Admin/{controller}/{action}/{page}",
new { controller = "Account", action = "Index", page = UrlParameter.Optional }
);
context.MapRouteLowercase(
"Admin_defaultroute",
"Admin/{controller}/{action}/{id}",
new { controller = "Admin", action = "Index", id = UrlParameter.Optional }
);
}
示例13: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
// URL: /secure/
// URL: /secure/corp/details/117
context.MapRouteLowercase(
RouteNames.Secure.Default,
RouteUrls.Secure.Default,
new
{
controller = "Home",
action = "Index",
id = UrlParameter.Optional
},
new[] { ControllerNamespaces.Secure }
);
// URL: /secure/corp/1/10/member/true
// URL: /secure/corp/1/10/member/false
// URL: /secure/corp/2/50/corporation/false
// URL: /secure/itemdatabase/1/10/name/true?keywords=vexor >> Html form submissions [GET] aren't aware of MVC routes so will generate a querystring by default. Ambient parameters make no difference.
context.MapRouteLowercase(
RouteNames.Secure.Data,
RouteUrls.Secure.Data,
new
{
controller = "Home",
action = "Index",
pageIndex = UrlParameter.Optional,
pageSize = UrlParameter.Optional,
sortBy = UrlParameter.Optional,
sortAscending = UrlParameter.Optional
},
new[] { ControllerNamespaces.Secure }
);
}
示例14: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRouteLowercase(
"Admin_default",
"Admin/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional }
, new[] { "YunShop.Web.Areas.Admin.Controllers" }
);
//context.MapRoute(
// "Admin_default",
// "Admin/{controller}/{action}/{id}",
// new {action = "Index", id = UrlParameter.Optional}
// , new[] {"YunShop.Web.Areas.Admin.Controllers"}
// );
}