public static void RegisterRoutes(System.Web.Routing.RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); //routes.MapRoute( // name: "SomeName1", // url: "A/B", // defaults: new { controller = "M", action = "N" }, // namespaces: new[] { "My_Web_Template.Controllers" } //); //routes.MapRoute( // name: "SomeName2", // url: "Page/{name}", // defaults: new { controller = "Page", action = "Display", name = System.Web.Mvc.UrlParameter.Optional }, // namespaces: new[] { "My_Web_Template.Controllers" } //); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = System.Web.Mvc.UrlParameter.Optional }, namespaces: new[] { "My_Web_Template.Controllers" } ); }
public void RegisterRoutes(System.Web.Routing.RouteCollection routes) { ViewEngines.Engines.Insert(0, new PromoViewEngine()); routes.MapRoute("Plugin.Widget.PromoSlider.License", "PromoSliderLicense", new { controller = "PromoSlider", action = "License" }, new[] { "Nop.Plugin.Widget.PromoSlider.Controllers" } ); routes.MapRoute("Plugin.Widget.PromoSlider.Blog", "blog", new { controller = "PromoSlider", action = "Blog" }, new[] { "Nop.Plugin.Widget.PromoSlider.Controllers" } ); }
public void RegisterRoutes(System.Web.Routing.RouteCollection routes) { routes.MapRoute( "Statistics", "Stats/{action}", new { controller = "Stats", action = "Index" }); }
public void RegisterRoutes(System.Web.Routing.RouteCollection routes) { routes.MapRoute( "Search", "Search/{action}", new { controller = "Search" } ); }
public static void RegisterRoutes(System.Web.Routing.RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = System.Web.Mvc.UrlParameter.Optional } ); }
/// <summary> /// Registers routes within <see cref="T:System.Web.Routing.RouteCollection"/> for the application. /// </summary> /// <param name="routes">The <see cref="T:System.Web.Routing.RouteCollection"/> from the <see cref="P:System.Web.Routing.RouteTable.Routes"/>.</param> public void Register(System.Web.Routing.RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional }, new string[] { "MyNamespace.Controllers" }); // Parameter defaults }
public void RegisterRoutes(System.Web.Routing.RouteCollection routes) { ViewEngines.Engines.Insert(0, new CustomViewEngine()); var route = routes.MapRoute("Plugin.Dreamy.Menu.Topic", "Admin/Topic/List", new { controller = "Topic", action = "List" }, new[] { "Nop.Plugin.Dreamy.Menu.Controllers" }); routes.Remove(route); routes.Insert(0, route); }
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" }); }
public static void RegisterRoutes(System.Web.Routing.RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); string[] array = new string[1]; array[0] = "WebMathsExpEvaluator"; routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }, namespaces: array); }
public void RegisterRoutes(System.Web.Routing.RouteCollection routes) { routes.MapRoute( "Account", "Account/{action}", new { controller = "Account" } ); routes.MapRoute( "Group", "Group/{action}", new { controller = "Group" } ); routes.MapRoute( "User", "User/{action}", new { controller = "User" } ); }
public static void RegisterRoutes(System.Web.Routing.RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Login", action = "Index", id = System.Web.Mvc.UrlParameter.Optional }, namespaces: new[] { "MY_MVC_APPLICATION.Controllers" } ); }
private static void MapFirst(System.Web.Routing.RouteCollection routes, string name, string path, object defaults, string[] namespaces, object constraints = null) { var route = routes.MapRoute(name, path, defaults); if (constraints != null) { route.Constraints = new System.Web.Routing.RouteValueDictionary(constraints); } routes.Remove(route); routes.Insert(0, route); }
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" }); }
public static void RegisterRoutes(System.Web.Routing.RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); // ترتيب نوشتن اهميت دارد // و بايد دستورات استثناء ذيل، قبل از دستور پيش فرض اصلی نوشته شوند routes.MapRoute( name: "SomeName1", url: "A/B", defaults: new { controller = "M", action = "N" }, namespaces: new[] { "LEARNING_AREA.Controllers" } ); routes.MapRoute( name: "SomeName2", url: "Page/{name}", defaults: new { controller = "Page", action = "Display", name = System.Web.Mvc.UrlParameter.Optional }, namespaces: new[] { "LEARNING_AREA.Controllers" } ); //routes.MapRoute( // name: "Default", // url: "{controller}/{action}/{id}", // defaults: new { controller = "Home", action = "Index", id = System.Web.Mvc.UrlParameter.Optional } //); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = System.Web.Mvc.UrlParameter.Optional }, namespaces: new[] { "LEARNING_AREA.Controllers" } ); }
public void RegisterRoutes(System.Web.Routing.RouteCollection routes) { System.Web.Mvc.ViewEngines.Engines.Add(new ExtendedVendorViewEngine()); routes.MapRoute("ExtendedVendorEditVendor", "extendedvendor/vendor/edit/{Id}", new { controller = "ExtendedVendor", action = "EditVendor", Id = 0 }, new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }).DataTokens.Add("area", "Admin"); routes.MapRoute("ExtendedVendorSaveVendor", "extendedvendor/vendor/save", new { controller = "ExtendedVendor", action = "SaveVendor" }, new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }).DataTokens.Add("area", "Admin"); routes.MapRoute("ExtendedVendorEditReview", "extendedvendor/vendor/review/edit/{Id}", new { controller = "ExtendedVendor", action = "EditReview", Id = 0 }, new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }).DataTokens.Add("area", "Admin"); routes.MapRoute("ExtendedVendorListReviewsAdmin", "extendedvendor/vendor/review/list/{VendorId}", new { controller = "ExtendedVendor", action = "ListReviewsAdmin", VendorId = 0 }, new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }).DataTokens.Add("area", "Admin"); routes.MapRoute("ExtendedVendorDetails", "vendor-details/{SeName}", new { controller = "ExtendedVendor", action = "ExtendedVendorDetails" }, new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }); routes.MapRoute("ExtendedVendorListPayoutsAdmin", "extendedvendor/vendor/payout/list/{VendorId}", new { controller = "ExtendedVendor", action = "ListPayoutsAdmin", VendorId = 0 }, new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }).DataTokens.Add("area", "Admin"); routes.MapRoute("ExtendedVendorEditPayout", "extendedvendor/vendor/payout/edit/{Id}", new { controller = "ExtendedVendor", action = "EditPayout", Id = 0 }, new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }).DataTokens.Add("area", "Admin"); routes.MapRoute("ExtendedVendorSavePayout", "extendedvendor/vendor/payout/save", new { controller = "ExtendedVendor", action = "SavePayout" }, new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }).DataTokens.Add("area", "Admin"); routes.MapRoute("ExtendedVendorEditReviewPublic", "edit-extended-review/{OrderId}/{ProductId}", new { controller = "ExtendedVendor", action = "EditExtendedReview", }, new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }); routes.MapRoute("ExtendedVendorReviewCenterLoader", "customer/review-center", new { controller = "ExtendedVendor", action = "UserReviews", }, new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }); routes.MapRoute("ExtendedVendorReviewCenter", "account/review-center/{Type}", new { controller = "ExtendedVendor", action = "UserReviewsData", Type = "product", }, new[] { "RoastedBytes.Nop.Plugin.Misc.ExtendedVendor.Controllers" }); }
public void RegisterRoutes(System.Web.Routing.RouteCollection routes) { /*routes.MapPageRoute( * "Player", * "Player/{file}", * "~/Plugins/IUDICO.TestingSystem.dll/IUDICO.TestingSystem/Player/{file}"); * routes.MapPageRoute( * "PlayerImages", * "Player/Images/{file}", * "~/Plugins/IUDICO.TestingSystem.dll/IUDICO.TestingSystem/Player/Images/{file}"); * routes.MapPageRoute( * "PlayerInclude", * "Player/Include/{file}", * "~/Plugins/IUDICO.TestingSystem.dll/IUDICO.TestingSystem/Player/Include/{file}"); */ routes.MapPageRoute( "PlayerFrameset", "Player/Frameset/{page}.aspx", "~/Plugins/IUDICO.TestingSystem.dll/IUDICO.TestingSystem/Player/{page}.aspx"); routes.MapPageRoute( "PlayerContent", "Player/Frameset/Content.aspx/{one}/{two}/{three}", "~/Plugins/IUDICO.TestingSystem.dll/IUDICO.TestingSystem/Player/Content.aspx"); routes.MapPageRoute( "PlayerContentExtended", "Player/Frameset/Content.aspx/{one}/{two}/{three}/{four}", "~/Plugins/IUDICO.TestingSystem.dll/IUDICO.TestingSystem/Player/Content.aspx"); routes.MapPageRoute( "PlayerContentFive", "Player/Frameset/Content.aspx/{one}/{two}/{three}/{four}/{five}", "~/Plugins/IUDICO.TestingSystem.dll/IUDICO.TestingSystem/Player/Content.aspx"); routes.MapPageRoute( "PlayerContentSix", "Player/Frameset/Content.aspx/{one}/{two}/{three}/{four}/{five}/{six}", "~/Plugins/IUDICO.TestingSystem.dll/IUDICO.TestingSystem/Player/Content.aspx"); routes.MapPageRoute( "PlayerContentSeven", "Player/Frameset/Content.aspx/{one}/{two}/{three}/{four}/{five}/{six}/{seven}", "~/Plugins/IUDICO.TestingSystem.dll/IUDICO.TestingSystem/Player/Content.aspx"); routes.MapPageRoute( "PlayerContentEight", "Player/Frameset/Content.aspx/{one}/{two}/{three}/{four}/{five}/{six}/{seven}/{eight}", "~/Plugins/IUDICO.TestingSystem.dll/IUDICO.TestingSystem/Player/Content.aspx"); routes.MapPageRoute( "PlayerContentNine", "Player/Frameset/Content.aspx/{one}/{two}/{three}/{four}/{five}/{six}/{seven}/{eight}/{nine}", "~/Plugins/IUDICO.TestingSystem.dll/IUDICO.TestingSystem/Player/Content.aspx"); /* routes.MapPageRoute( * "PlayerImages", * "Player/Frameset/Images/{page}", * "~/Plugins/IUDICO.TestingSystem.dll/IUDICO.TestingSystem/Player/Images/{page}"); * routes.MapPageRoute( * "PlayerInclude", * "Player/Frameset/Include/{page}", * "~/Plugins/IUDICO.TestingSystem.dll/IUDICO.TestingSystem/Player/Include/{page}"); * routes.MapPageRoute( * "PlayerTheme", * "Player/Frameset/Theme/{page}", * "~/Plugins/IUDICO.TestingSystem.dll/IUDICO.TestingSystem/Player/Theme/{page}");*/ /*routes.MapRoute( * "Training", * "Training/{packageId}/{attemptId}", * new { controller = "Training", action = "Details", attemptId = UrlParameter.Optional }, * new { packageID = @"\d+" }); * routes.MapRoute( * "Trainings", * "Training/{action}/{id}", * new { controller = "Training", action = "Index", id = UrlParameter.Optional } * );*/ //routes.IgnoreRoute("Content/TimePicker.css"); routes.MapRoute( "Training", "Training/{action}", new { controller = "Training" }); }
public void RegisterRoutes(System.Web.Routing.RouteCollection routes) { routes.MapRoute( "Discipline", "Discipline/{DisciplineID}/{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( "Topic", "Topic/{TopicId}/{action}", new { controller = "Topic" } ); routes.MapRoute( "Topics", "Chapter/{ChapterId}/Topic/{action}", new { controller = "Topic" } ); routes.MapRoute( "Curriculum", "Curriculum/{CurriculumId}/{action}", new { controller = "Curriculum" } ); routes.MapRoute( "Curriculums", "Discipline/{DisciplineId}/Curriculum/{action}", new { controller = "Curriculum" } ); routes.MapRoute( "CurriculumTimeline", "CurriculumTimeline/{TimelineId}/{action}", new { controller = "CurriculumTimeline" } ); routes.MapRoute( "CurriculumTimelines", "Curriculum/{CurriculumId}/CurriculumTimeline/{action}", new { controller = "CurriculumTimeline" } ); routes.MapRoute( "ChapterTimeline", "ChapterTimeline/{TimelineId}/{action}", new { controller = "ChapterTimeline" } ); routes.MapRoute( "ChapterTimelines", "Curriculum/{CurriculumId}/ChapterTimeline/{action}", new { controller = "ChapterTimeline" } ); routes.MapRoute( "TopicAssignment", "TopicAssignment/{TopicAssignmentId}/{action}", new { controller = "TopicAssignment" } ); routes.MapRoute( "TopicAssignments", "Curriculum/{CurriculumId}/TopicAssignment/{action}", new { controller = "TopicAssignment" } ); }
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", action = "Index" } ); routes.MapRoute( "Stage", "Stage/{StageId}/{action}", new { controller = "Stage" } ); routes.MapRoute( "Stages", "Curriculum/{CurriculumId}/Stage/{action}", new { controller = "Stage" } ); routes.MapRoute( "Theme", "Theme/{ThemeId}/{action}", new { controller = "Theme" } ); routes.MapRoute( "Themes", "Stage/{StageId}/Theme/{action}", new { controller = "Theme" } ); routes.MapRoute( "CurriculumAssignment", "CurriculumAssignment/{CurriculumAssignmentId}/{action}", new { controller = "CurriculumAssignment" } ); routes.MapRoute( "CurriculumAssignments", "Curriculum/{CurriculumId}/CurriculumAssignment/{action}", new { controller = "CurriculumAssignment" } ); routes.MapRoute( "CurriculumAssignmentTimeline", "CurriculumAssignmentTimeline/{TimelineId}/{action}", new { controller = "CurriculumAssignmentTimeline" } ); routes.MapRoute( "CurriculumAssignmentTimelines", "CurriculumAssignment/{CurriculumAssignmentId}/CurriculumAssignmentTimeline/{action}", new { controller = "CurriculumAssignmentTimeline" } ); routes.MapRoute( "StageTimeline", "StageTimeline/{TimelineId}/{action}", new { controller = "StageTimeline" } ); routes.MapRoute( "StageTimelines", "CurriculumAssignment/{CurriculumAssignmentId}/StageTimeline/{action}", new { controller = "StageTimeline" } ); routes.MapRoute( "ThemeAssignment", "ThemeAssignment/{ThemeAssignmentId}/{action}", new { controller = "ThemeAssignment" } ); routes.MapRoute( "ThemeAssignments", "CurriculumAssignment/{CurriculumAssignmentId}/ThemeAssignment/{action}", new { controller = "ThemeAssignment" } ); }
public void RegisterRoutes(System.Web.Routing.RouteCollection routes) { routes.MapRoute(null, "apps/flowdock/configure", new { controller = "Flowdock", action = "SaveConfig" }); }