public override void RegisterArea(AreaRegistrationContext context) { // 如果规则 Rfid_Order 再前面,则此规则无效,会总是匹配到 Rfid_Order 规则,把参数当做 action 了 context.MapRouteLowercase( "Rfid_Order_Detail", "Order/Rfid/{jno}", new { controller = "RfidOrder", action = "Details" } ); context.MapRouteLowercase( "Rfid_Order", "Order/Rfid/{action}", new { controller = "RfidOrder", action = "Create" } ); context.MapRouteLowercase( "Graphic_Order_Detail", "Order/Graphic/{jno}", new { controller = "GraphicOrder", action = "Details" } ); context.MapRouteLowercase( "Graphic_Order", "Order/Graphic/{action}", new { controller = "GraphicOrder", action = "Create" } ); context.MapRouteLowercase( "Order_default", "Order/{action}/{id}", new { controller = "Order", action = "Check", id = UrlParameter.Optional } ); }
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" } //); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRouteLowercase( "Set_default", "Set/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional } ); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRouteLowercase( "Access_default", "Access/{controller}/{action}/{id}", new { controller = "User", action = "List", id = UrlParameter.Optional } ); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRouteLowercase( "Production_default", "Production/{controller}/{action}/{id}", new { controller = "Home", action = "Home", id = UrlParameter.Optional } ); }
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" } ); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRouteLowercase( "ResearchAndDevelopment_default", "ResearchAndDevelopment/{controller}/{action}/{id}", new { controller = "Home", action = "Home", id = UrlParameter.Optional } ); }
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" } ); }
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" } ); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRouteLowercase( "api_Route", "api/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional }, null, new[] { "Balcony.Miracle.Web.Areas.Api.Controllers" } ); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRouteLowercase( "admin_default", "admin/{controller}/{action}/{id}", new { controller = "areas", action = "Index", id = UrlParameter.Optional }, null, new[] { "Balcony.Miracle.Web.Areas.Admin.Controllers" } ); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRouteLowercase( "Account_default", "account/{controller}/{action}/{id}", new { controller = "Account", id = UrlParameter.Optional }, new string[] { "eStore.Web.UI.Areas.Account.Controllers" } ); }
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 } ); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRouteLowercase( "admin_default", "admin/{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = UrlParameter.Optional }, new[] { "SocialNetwork.Web.Areas.admin.Controllers" } ); /* context.MapRouteLowercase( * "Admin_elmah", * "admin/elmah/{type}", * new {action = "Index", controller = "Elmah", type = UrlParameter.Optional} * );*/ }
public override void RegisterArea(AreaRegistrationContext context) { //context.MapRoute( // "Default", string.Empty); context.MapRouteLowercase( "Store_default", "store/{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = UrlParameter.Optional }, new string[] { "eStore.Web.UI.Areas.Store.Controllers" } ); context.Routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( name: "ForumHome", url: "المنتدى", defaults: new { controller = "ForumHome", action = "Index", Area = "Forum" }, namespaces: new[] { "MVCForum.Website.Controllers" } ); context.MapRoute( "Forum_Favorite", "المنتدى/المفضلة/{action}/{id}", new { action = "Index", controller = "Favourite", id = UrlParameter.Optional, }, null, namespaces: new[] { "MVCForum.Website.Controllers" } ); context.MapRoute( "Forum_AllCategory", "المنتدى/تصنيفات", new { action = "Index", controller = "Category" }, null, namespaces: new[] { "MVCForum.Website.Controllers" } ); context.MapRouteLowercase( "categoryUrls", // Route name string.Concat("المنتدى/", AppConstants.CategoryUrlIdentifier, "/{slug}"), // URL with parameters new { controller = "Category", action = "Show", slug = UrlParameter.Optional } // Parameter defaults , namespaces: new[] { "MVCForum.Website.Controllers" } ); context.MapRouteLowercase( "categoryRssUrls", // Route name string.Concat("المنتدى/", AppConstants.CategoryUrlIdentifier, "/rss/{slug}"), // URL with parameters new { controller = "Category", action = "CategoryRss", slug = UrlParameter.Optional } // Parameter defaults , namespaces: new[] { "MVCForum.Website.Controllers" } ); context.MapRoute( "Forum_Category", "المنتدى/تصنيفات/{action}/{id}", new { action = "Index", controller = "Category", id = UrlParameter.Optional, }, null, namespaces: new[] { "MVCForum.Website.Controllers" } ); context.MapRouteLowercase( "topicUrls", // Route name string.Concat("المنتدى/", AppConstants.TopicUrlIdentifier, "/{slug}"), // URL with parameters new { controller = "Topic", action = "Show", slug = UrlParameter.Optional } // Parameter defaults , namespaces: new[] { "MVCForum.Website.Controllers" } ); context.MapRouteLowercase( "memberUrls", // Route name string.Concat("المنتدى/", AppConstants.MemberUrlIdentifier, "/{slug}"), // URL with parameters new { controller = "Members", action = "GetByName", slug = UrlParameter.Optional } // Parameter defaults , namespaces: new[] { "MVCForum.Website.Controllers" } ); context.MapRouteLowercase( "tagUrls", // Route name string.Concat("المنتدى/", AppConstants.TagsUrlIdentifier, "/{tag}"), // URL with parameters new { controller = "Topic", action = "TopicsByTag", tag = UrlParameter.Optional } // Parameter defaults , namespaces: new[] { "MVCForum.Website.Controllers" } ); context.MapRoute( "Forum_default", "Forum/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional }, null, namespaces: new[] { "MVCForum.Website.Controllers" } ); }
public static Route MapRouteLowercase(this AreaRegistrationContext context, string name, string url) { return(context.MapRouteLowercase(name, url, null)); }
public static Route MapRouteLowercase(this AreaRegistrationContext context, string name, string url, object defaults, object constraints) { return(context.MapRouteLowercase(name, url, defaults, constraints, null)); }