public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); //settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.LowercaseUrls = true; }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.Ignore("*.img"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); // First parameter: Name of route // Second parameter: URL of route {variables} // Third parameter: Default values // Fourth parameter: Contraints (optional) // Profile/username Route routes.MapPageRoute("Profile", "Account/Profile/{username}", "~/Account/Profile/Profile.aspx", true, new RouteValueDictionary { { "username", "" } }); // Profile/username/AccountInfo Route routes.MapPageRoute("ProfileAccountDetails", "Account/Profile/{username}/{accountDetails}", "~/Account/Profile/AccountDetails.aspx", true, new RouteValueDictionary { { "username", "" }, { "accountDetails", "" }}); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "sitemap.xml", url: "sitemap.xml", defaults: new { controller = "Site", action = "SitemapXml" }, namespaces: new[] { "venteBoisBachin2.Controllers" } ); routes.MapRoute( name: "robots.txt", url: "robots.txt", defaults: new { controller = "Site", action = "RobotsText" }, namespaces: new[] { "venteBoisBachin2.Controllers" } ); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); //settings.AutoRedirectMode = RedirectMode.Permanent; //comment by sourav settings.AutoRedirectMode = RedirectMode.Off; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); //settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("Root","","~/Source/HotelManager/ManagerHotel.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings { AutoRedirectMode = RedirectMode.Temporary }; routes.EnableFriendlyUrls(settings, new UrlFriendlyResolver()); //map custom moutain goat outfitters page routes routes.AddRoutes(new [] { new Route("{resource}.axd/{*pathInfo}", new StopRoutingHandler()), new WebFormRoutes { { "Data/Product", "~/Data/ProductData.aspx" }, { "Customer/Info", "~/Data/CustomerInfo.aspx" }, { "Customer/Purchases", "~/Data/CustomerPurchases.aspx" }, { "Employee/Info", "~/Data/Manager/EmployeeInfo.aspx" }, { "Employee/Purchases", "~/Data/Manager/EmployeePurchases.aspx" }, { "Report/Commission", "~/Report/Manager/Commission.aspx" }, { "Report/Customer", "~/Report/Customer.aspx" }, { "Report/Employee", "~/Report/Manager/Employee.aspx" }, { "Report/Product", "~/Report/Product.aspx" }, { "Report/Revenue", "~/Report/Manager/Revenue.aspx" }, { "Report/Revenue/Category", "~/Report/Manager/CategoryRevenue.aspx" }, { "Report/Sales/Product", "~/Report/Manager/ProductSales.aspx" }, { "Report/Sales/Employee", "~/Report/Manager/EmployeeSales.aspx" }, { "Report/Trend", "~/Report/Manager/Trend.aspx" } }, new MvcRoute("{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional }) }); }
private void ExecuteTest(string test, FriendlyUrlSettings settings, Dictionary <string, string> testFields) { var tabName = testFields["Page Name"]; var tc = new TabController(); var tab = tc.GetTabByName(tabName, PortalId); ExecuteTestForTab(test, tab, settings, testFields); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings, new SiteMobileMasterDisable()); routes.MapPageRoute("DefRedirect", "Default", "~/Game/Home.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); //settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("Timeline", "Timeline/{*Catalog}", "~/Views/SocialMediaSystem/Timeline.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); //TODO: Changed from Permanent when implementing Webmethods //Not sure what this will do if I decide to use Login. settings.AutoRedirectMode = RedirectMode.Off; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); //Commenting the above code and using the below line gets rid of the master mobile site. //routes.EnableFriendlyUrls(); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Off; routes.EnableFriendlyUrls(settings); routes.Add(new Route("{imageID}", new RouteHandler())); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Off; //off für Pagemethods default.aspx-> default routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); //Change to Permenant before going to production settings.AutoRedirectMode = RedirectMode.Temporary; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings, new MyWebFormsFriendlyUrlResolver()); routes.MapPageRoute("default", "", "~/shopping.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { //routes.Canonicalize().Lowercase(); var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings, new IFriendlyUrlResolver[] { new MyWebFormsFriendlyUrlResolver() }); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); //settings.AutoRedirectMode = RedirectMode.Permanent; settings.AutoRedirectMode = RedirectMode.Off; // Stops the ajax call redirecting to root page routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); //routes.MapHttpRoute( name: "Default", routeTemplate: "{controller}/{id}", defaults: new { id = RouteParameter.Optional }); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; // routes.EnableFriendlyUrls(settings); routes.MapPageRoute("scenarioDefault", "tests", "~/Scenarios/Default.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("DefaultRoute", string.Empty, "~/En/Home.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings { AutoRedirectMode = RedirectMode.Permanent }; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings { AutoRedirectMode = RedirectMode.Off }; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); // Ligne retirée car elle bloque les requêtes AJAX //settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; // settings.AutoRedirectMode = RedirectMode.Off; //routes.IgnoreRoute("{page}.aspx/{*webmethod}"); routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.Ignore("{resource}.axd/{*pathinfo}"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("survey", "survey/{surveyUrl}", "~/Survey/Default.aspx"); routes.MapPageRoute("surveyform", "surveyform/{surveyUrl}", "~/Survey/SurveyPage.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("default", "", "~/Estudiante/Estudiante.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("PageRouting", "Pages/{" + SystemConstants.PageID + "}", "~/Pages/Default.aspx"); routes.MapPageRoute("ActivityRouting", "Activity/{" + SystemConstants.qs_ActivitiesID + "}/{" + SystemConstants.ActivityName + "}", "~/Activity/Default.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("auth_login", "auth/login", "~/Auth/Login.aspx"); routes.MapPageRoute("auth_callback", "auth/callback", "~/Auth/Callback.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { routes.MapPageRoute("Login", "login", "~/Account/Login.aspx"); var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("default", "", "~/Home.aspx"); routes.MapPageRoute("404", "{*url}", "~/StaticPages/404.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); // See http://stackoverflow.com/questions/32663858/jquery-ajax-calls-not-working-with-asp-net-web-forms-when-friendlyurls-are-added settings.AutoRedirectMode = RedirectMode.Permanent; //settings.AutoRedirectMode = RedirectMode..Off; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { /** TODO : * 1.Try to configure routes */ var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Off; routes.EnableFriendlyUrls(settings); //routes.Ignore("{assets}", new { assets = @".*\.(css|js|gif|jpg)(/.)?" }); routes.MapPageRoute("BibleVerse", "BibleVerse/{bible-verse-id}", "~/BibleVerses.aspx"); routes.MapPageRoute("ReligiousQuote", "ReligiousQuote/{religious-quote-id}", "~/ReligiousQuotes.aspx"); routes.MapPageRoute("Church", "Church/{church-id}", "~/Churches.aspx"); routes.MapPageRoute("Organization", "Organization/{organization-id}", "~/Organizations.aspx"); routes.MapPageRoute("Devotion", "Dvote/{devote-id}", "~/Devotion.aspx"); routes.MapPageRoute("BasicCatholicPrayer", "Prayer/{prayer-id}", "~/BasicCatholicPrayer.aspx"); routes.MapPageRoute("OtherCatholicPrayer", "OtherPrayer/{other-prayer-id}", "~/OtherCatholicPrayer.aspx"); routes.MapPageRoute("Gospel", "Gospel/{gospel-id}", "~/DailyGospel.aspx"); routes.MapPageRoute("DailyReflection", "Reflection/{daily-reflection-id}", "~/DailyReflection.aspx"); routes.MapPageRoute("MusicalInspiration", "MusicalInspiration/{music-id}", "~/MusicalInspirations.aspx"); routes.MapPageRoute("Saint", "Saint/{saint-id}", "~/Saintlisting.aspx"); routes.MapPageRoute("Announcement", "Announcement/{announcement-id}", "~/Churches.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { //friendly url var settings = new FriendlyUrlSettings { AutoRedirectMode = RedirectMode.Permanent, ResolverCachingMode = ResolverCachingMode.Dynamic }; routes.EnableFriendlyUrls(settings); //ignore routes routes.Ignore("{resource}.axd/{*pathInfo}"); // routs routes.MapPageRoute("EditArticle", "User/Articles/Edit/{id}", "~/Managements/Articles/Edit.aspx", true, null, new RouteValueDictionary { { "id", @"\d+" } }); routes.MapPageRoute("DeleteArticle", "User/Articles/Delete/{id}", "~/Managements/Articles/Delete.aspx", true, null, new RouteValueDictionary { { "id", @"\d+" } }); routes.MapPageRoute("ShowArticles", "User/Articles/Show", "~/Managements/Articles/Default.aspx", true, null, null); routes.MapPageRoute("InsertArticle", "User/Articles/Insert", "~/Managements/Articles/Insert.aspx", true, null, null); routes.MapPageRoute("DeleteComment", "Forum/Topic/{topicId}/post/Comments/{id}", "~/Managements/Comments/Delete.aspx", true, null, new RouteValueDictionary { { "id", @"\d+" }, { "topicId", @"\d+" } }); routes.MapPageRoute("AddComment", "Forum/Topic/{topicId}/post/{postId}/NewComment", "~/Managements/Comments/Insert.aspx", true, null, new RouteValueDictionary { { "postId", @"\d+" }, { "topicId", @"\d+" } }); routes.MapPageRoute("DeletePost", "Forums/Topic/{topicId}/Posts/Delete/{id}", "~/Managements/ForumPost/Delete.aspx", true, null, new RouteValueDictionary { { "id", @"\d+" }, { "topicId", @"\d+" } }); routes.MapPageRoute("EditPost", "Forums/Topic/{topicId}/Posts/Edit/{id}", "~/Managements/ForumPost/Edit.aspx", true, null, new RouteValueDictionary { { "id", @"\d+" }, { "topicId", @"\d+" } }); routes.MapPageRoute("ChangePass", "User/ChangePass", "~/Account/ChangePass.aspx", true); routes.MapPageRoute("Confirm", "Confirm", "~/Account/Confirm.aspx", true); routes.MapPageRoute("login", "Login", "~/Account/Login.aspx", true); routes.MapPageRoute("ShowPost", "Forums/Topic/{topicId}/Posts", "~/Managements/ForumPost/Default.aspx", true, null, new RouteValueDictionary { { "topicId", @"\d+" } }); routes.MapPageRoute("ShowMsg", "User/Conversation/{id}/Messages", "~/Account/ShowMessages.aspx", true, new RouteValueDictionary { { "id", "" } }, new RouteValueDictionary { { "id", @"\d+" } }); routes.MapPageRoute("EditForum", "Forum/Edit/{id}", "~/Managements/Forum/Edit.aspx", true, null, new RouteValueDictionary { { "id", @"\d+" } }); routes.MapPageRoute("DeleteForum", "Forum/Delete/{id}", "~/Managements/Forum/Delete.aspx", true, null, new RouteValueDictionary { { "id", @"\d+" } }); routes.MapPageRoute("InsertForum", "Forum/Insert", "~/Managements/Forum/Insert.aspx", true); routes.MapPageRoute("DeleteTopic", "Forums/{forumId}/Topics/Delete/{id}", "~/Managements/ForumTopic/Delete.aspx", true, null, new RouteValueDictionary { { "id", @"\d+" }, { "forumId", @"\d+" } }); routes.MapPageRoute("EditTopic", "Forums/{forumId}/Topics/Edit/{id}/{fromPost}", "~/Managements/ForumTopic/Edit.aspx", true, new RouteValueDictionary { { "fromPost",0 } }, new RouteValueDictionary { { "id", @"\d+" }, { "forumId", @"\d+" }, { "fromPost", @"\d+" } }); routes.MapPageRoute("CreateTopic", "Forums/{id}/Topics/NewTopic", "~/Managements/ForumTopic/Insert.aspx", true); routes.MapPageRoute("Profile", "Profile/{id}", "~/Account/PublicProfile.aspx", true, null, new RouteValueDictionary { { "id", @"\d+" } }); routes.MapPageRoute("MainForum", "Forum", "~/Managements/Forum/Default.aspx", true); routes.MapPageRoute("SubForums", "Forums/{id}", "~/Managements/ForumTopic/Default.aspx", true, null, new RouteValueDictionary { { "id", @"\d+" } }); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); // En este caso se cambia el tipo de "FriendlyUrl" a usar (VS lo asigna como "Permanent") // De estar en "Permanent", al llamar al método de página, la respuesta ajax será de "Error de Autenticacion" : // Sys.Net.WebServiceError {_timedOut: false, _message: "Error de autenticación.", _stackTrace: null, _exceptionType: "System.InvalidOperationException", _errorObject: {…}, …} settings.AutoRedirectMode = RedirectMode.Off; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("account", "Account/{action}/{*params}", "~/Account/{action}.aspx"); routes.MapPageRoute("admin", "admin/{action}/{*params}", "~/pages/admin/{action}.aspx"); routes.MapPageRoute("user", "user/{action}/{*params}", "~/pages/user/{action}.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings { AutoRedirectMode = RedirectMode.Permanent }; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("default", "", "~/Pages/HomePage.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); routes.EnableFriendlyUrls(settings); routes.MapPageRoute("default", string.Empty, "~/Dashboard.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); //The below is the original: //settings.AutoRedirectMode = RedirectMode.Permanent; //The below is new to allow ajax calls: settings.AutoRedirectMode = RedirectMode.Off; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; // settings.AutoRedirectMode = RedirectMode.Off; //routes.EnableFriendlyUrls(settings); routes.EnableFriendlyUrls(settings, new Microsoft.AspNet.FriendlyUrls.Resolvers.IFriendlyUrlResolver[] { new MyWebFormsFriendlyUrlResolver() }); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.Add(new Route("message/send", new SampleAspServer.Handlers.MessageRouteHandler())); routes.Add(new Route("message/list", new SampleAspServer.Handlers.ListRouteHandler())); routes.Add(new Route("image/upload", new SampleAspServer.Handlers.ImageUploadRouteHandler())); }
private void ExecuteTestForTab(TabInfo tab, FriendlyUrlSettings settings, Dictionary <string, string> testFields) { var httpAlias = testFields.GetValue("Alias", string.Empty); var scheme = testFields["Scheme"]; var url = testFields["Test Url"]; var result = testFields["Expected Url"]; var expectedStatus = int.Parse(testFields["Status"]); var redirectUrl = testFields.GetValue("Final Url"); var redirectReason = testFields.GetValue("RedirectReason"); var theTabId = (tab == null) ? "-1" : tab.TabID.ToString(); var expectedResult = this.ReplaceTokens(testFields, result, theTabId); var testUrl = this.ReplaceTokens(testFields, url, theTabId); var expectedRedirectUrl = this.ReplaceTokens(testFields, redirectUrl, theTabId); this.CreateSimulatedRequest(new Uri(testUrl)); var request = HttpContext.Current.Request; var testHelper = new UrlTestHelper { HttpAliasFull = scheme + httpAlias + "/", Result = new UrlAction(request) { IsSecureConnection = request.IsSecureConnection, RawUrl = request.RawUrl, }, RequestUri = new Uri(testUrl), QueryStringCol = new NameValueCollection(), }; this.ProcessRequest(settings, testHelper); // Test expected response status Assert.AreEqual(expectedStatus, testHelper.Response.StatusCode); switch (expectedStatus) { case 200: // Test expected rewrite path if (!string.IsNullOrEmpty(expectedResult)) { Assert.AreEqual(expectedResult, testHelper.Result.RewritePath.TrimStart('/')); } break; case 301: case 302: // Test for final Url if redirected Assert.IsTrue(expectedRedirectUrl.Equals(testHelper.Result.FinalUrl.TrimStart('/'), StringComparison.InvariantCultureIgnoreCase)); Assert.AreEqual(redirectReason, testHelper.Result.Reason.ToString(), "Redirect reason incorrect"); break; } }
private void ProcessRequest(FriendlyUrlSettings settings, UrlTestHelper testHelper) { var provider = new AdvancedUrlRewriter(); provider.ProcessTestRequestWithContext(HttpContext.Current, HttpContext.Current.Request.Url, true, testHelper.Result, settings); testHelper.Response = HttpContext.Current.Response; }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute( "book-route", "book/{id}", "~/default.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("Main", "", "~/Default.aspx"); routes.MapPageRoute("AdminPanel", "Admin", "~/Admin.aspx"); routes.MapPageRoute("LoginPanel", "Login", "~/Login.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); routes.MapPageRoute("shop-category", "Shop/Category/{category}", "~/Shop/Category.aspx"); routes.MapPageRoute("shop-reviews", "Shop/Reviews/{productid}", "~/Shop/Reviews.aspx"); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapPageRoute("DefaultAspx", "Default.aspx", "~/Default.aspx"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { action = "Index", id = UrlParameter.Optional } ); var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("ShowJudokas", "ShowJudokas/{CompetitionId}", "~/Competition/ShowJudokas.aspx"); routes.MapPageRoute("AddJudoka", "AddJudoka/{CompetitionId}", "~/Competition/AddJudoka.aspx"); routes.MapPageRoute("AddJudoka2", "AddJudoka2/{CompetitionId}/{JudokaId}", "~/Competition/AddJudoka2.aspx"); routes.MapPageRoute("RemoveJudoka", "RemoveJudoka/{CompetitionId}/{JudokaId}/{LinkId}", "~/Competition/RemoveJudoka.aspx"); routes.MapPageRoute("WeighJudoka", "WeighJudoka/{CompetitionId}/{JudokaId}/{LinkId}", "~/Competition/WeighJudoka.aspx"); routes.MapPageRoute("NewJudoka", "NewJudoka/{CompetitionId}", "~/Competition/NewJudoka.aspx"); routes.MapPageRoute("ExportJS", "ExportJS/{CompetitionId}", "~/Competition/ExportJS.aspx"); //routes.MapPageRoute("ChangebeltJudoka", "ChangebeltJudoka/{CompetitionId}/{JudokaId}/{BeltId}", "~/Competition/ChangebeltJudoka.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute(name: "Serial number", url: "serial/{letterCase}", defaults: new { controller = "Home", action = "Serial", letterCase = "upper" }); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Store", action = "Index", id = UrlParameter.Optional } ); var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute(null, "login", "~/Pages/Login.aspx"); routes.MapPageRoute(null, "logout", "~/Pages/Logout.aspx"); routes.MapPageRoute(null, "application", "~/Pages/SupplierApplicationPage.aspx"); routes.MapPageRoute(null, "events", "~/Pages/SupplierViewEvents.aspx"); routes.MapPageRoute(null, "events/add", "~/Pages/SupplierAddEvent.aspx"); routes.MapPageRoute(null, "supplierlistings", "~/Pages/ViewItemListing.aspx"); routes.MapPageRoute(null, "portal", "~/Pages/SupplierPortal.aspx"); routes.MapPageRoute(null, "listings", "~/PagesGuest/Default.aspx"); routes.MapPageRoute(null, "password", "~/Pages/Password.aspx"); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute( "CategoryDetails", "Category/{id}", "~/CategoryDetails.aspx", true, new RouteValueDictionary() { { "id", "" } }, new RouteValueDictionary() { { "id", "[0-9]{0,}" } }); routes.MapPageRoute( "BookDetails", "Book/{id}", "~/BookDetails.aspx", true, new RouteValueDictionary() { { "id", "" } }, new RouteValueDictionary() { { "id", "[0-9]{0,}" } }); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("", "", "~/WebForms/Claims/List.aspx"); routes.MapPageRoute("ClaimList", "Claims", "~/WebForms/Claims/List.aspx"); routes.MapPageRoute("ClaimEditor", "Claims/Editor", "~/WebForms/Claims/Editor.aspx"); routes.MapPageRoute("ClaimZipHistory", "Claims/ZipHistory", "~/WebForms/Claims/ZipHistory.aspx"); routes.MapPageRoute("SupplyPriceRequest", "Claims/Supply", "~/WebForms/Claims/Supply.aspx"); routes.MapPageRoute("ClientList", "Client", "~/WebForms/Client/List.aspx"); routes.MapPageRoute("ClientDetail", "Client/Detail", "~/WebForms/Client/Detail.aspx"); routes.MapPageRoute("ClientCounterList", "ClientCounter", "~/WebForms/Client/ListCounter.aspx"); routes.MapPageRoute("ClientCounterDetail", "Client/CounterDetail", "~/WebForms/Client/CounterDetail.aspx"); routes.MapPageRoute("ZipGroups", "Settings/ZipGroups", "~/WebForms/Settings/ZipGroups.aspx"); routes.MapPageRoute("PriceImport", "Settings/Price", "~/WebForms/Settings/PriceImport.aspx"); routes.MapPageRoute("ClientAccess", "Settings/ClientAccess", "~/WebForms/Settings/ClientAccess.aspx"); routes.MapPageRoute("ManagerOperator", "Settings/ManagerOperator", "~/WebForms/Settings/ManagerOperator.aspx"); routes.MapPageRoute("ClaimReport", "Reports/ClaimReport", "~/WebForms/Reports/ClaimReport.aspx"); // routes.MapPageRoute("Error", "Error", "~/WebForms/Error.aspx"); routes.MapPageRoute("ErrorGrp", "ErrorGrp", "~/WebForms/ErrorGrp.aspx"); #region Pictures //routes.RouteExistingFiles = false; routes.MapPageRoute("Chk-unchecked", "Images/Chk_tri_state/unchecked.gif", "~/Images/Chk_tri_state/unchecked.gif"); routes.MapPageRoute("Chk-checked", "Images/Chk_tri_state/checked.gif", "~/Images/Chk_tri_state/checked.gif"); routes.MapPageRoute("Chk-intermediate", "Images/Chk_tri_state/intermediate.gif", "~/Images/Chk_tri_state/intermediate.gif"); routes.MapPageRoute("Chk-unchecked_highlighted", "Images/Chk_tri_state/unchecked_highlighted.gif", "~/Images/Chk_tri_state/unchecked_highlighted.gif"); routes.MapPageRoute("Chk-checked_highlighted", "Images/Chk_tri_state/checked_highlighted.gif", "~/Images/Chk_tri_state/checked_highlighted.gif"); routes.MapPageRoute("Chk-intermediate_highlighted", "Images/Chk_tri_state/intermediate_highlighted.gif", "~/Images/Chk_tri_state/intermediate_highlighted.gif"); #endregion }
public static void RegisterRoutes(RouteCollection routes) { routes.MapPageRoute( "LectureInCourseRoute", "Lecturer/Courses/{courseId}", "~/Lecturer/Lecture.aspx"); routes.MapPageRoute( "StudentInCourseRoute", "Student/Courses/{courseId}", "~/Student/Lecture.aspx"); routes.MapPageRoute( "StudentHomeworkRoute", "Student/Homeworks/{lectureId}", "~/Student/Homework.aspx"); var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("Route1", "RegistrarKitBienvenida", "~/forms/procesos/EntregarKit.aspx"); routes.MapPageRoute("Route2", "ProgramarInstalacion", "~/forms/procesos/ProgramarInstalacion.aspx"); routes.MapPageRoute("Route3", "RegistrarInstalacion", "~/forms/procesos/RegistrarInstalacion.aspx"); routes.MapPageRoute("Route4", "EvaluarRiesgoFraude", "~/forms/procesos/EvaluarRiesgoFraude.aspx"); routes.MapPageRoute("Route5", "SolicitarInstalacion", "~/forms/procesos/SolicitarInstalacion.aspx"); routes.MapPageRoute("Route6", "RegistrarSolicitud", "~/forms/procesos/RegistrarSolicitud.aspx"); <<<<<<< HEAD routes.MapPageRoute("Route8", "ProgramarInspeccion", "~/forms/procesos/ProgramarInspeccion.aspx"); routes.MapPageRoute("Route9", "Registrar Inspeccion", "~/forms/procesos/RegistrarInspeccion.aspx"); routes.MapPageRoute("Route7", "RegistrarSolicitudAfilacion", "~/forms/procesos/RegistrarSolicitudAfilacion.aspx"); ======= >>>>>>> 877065dcfcaaf363d97f9650c0ade13b9a1ad3fd }
public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("", "", "~/WebForms/DevInst/List.aspx"); routes.MapPageRoute("DevInstList", "DevInst", "~/WebForms/DevInst/List.aspx"); routes.MapPageRoute("DevInstEditor", "DevInst/Editor", "~/WebForms/DevInst/Editor.aspx"); #region Pictures //routes.RouteExistingFiles = false; routes.MapPageRoute("Chk-unchecked", "Images/Chk_tri_state/unchecked.gif", "~/Images/Chk_tri_state/unchecked.gif"); routes.MapPageRoute("Chk-checked", "Images/Chk_tri_state/checked.gif", "~/Images/Chk_tri_state/checked.gif"); routes.MapPageRoute("Chk-intermediate", "Images/Chk_tri_state/intermediate.gif", "~/Images/Chk_tri_state/intermediate.gif"); routes.MapPageRoute("Chk-unchecked_highlighted", "Images/Chk_tri_state/unchecked_highlighted.gif", "~/Images/Chk_tri_state/unchecked_highlighted.gif"); routes.MapPageRoute("Chk-checked_highlighted", "Images/Chk_tri_state/checked_highlighted.gif", "~/Images/Chk_tri_state/checked_highlighted.gif"); routes.MapPageRoute("Chk-intermediate_highlighted", "Images/Chk_tri_state/intermediate_highlighted.gif", "~/Images/Chk_tri_state/intermediate_highlighted.gif"); #endregion }
public static void RegisterRoutes(RouteCollection routes) { //enable the friendly urls for web forms var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); }