protected void Application_Start(object sender, EventArgs e) { //Istanzio la classe per l'aggiornamento delle statistiche del database in background _backgroundProcess = new BackgroundProcess(); RouteTable.Routes.RouteExistingFiles = false; RouteTable.Routes.Ignore("{resource}.axd/{*pathInfo}"); RouteTable.Routes.Ignore("amministratore/{*pathInfo}"); //Per il controllo chart RouteTable.Routes.Add("UrlHandler", new Route("{*url}", new HttpHandlerRoute("~/Code/HttpHandler/UrlHandler.ashx"))); }
protected void Application_Start(object sender, EventArgs e) { //Istanzio la classe per l'aggiornamento delle statistiche del database in background _backgroundProcess = new BackgroundProcess(); RouteTable.Routes.RouteExistingFiles = false; RouteTable.Routes.MapPageRoute("Evento", "evento/{nome}-{id}", "~/routehandler/evento.aspx", true); RouteTable.Routes.MapPageRoute("EventoImmagini", "eventoimmagini/{nome}-{id}", "~/routehandler/eventoimmagini.aspx", true); RouteTable.Routes.MapPageRoute("Staff", "staff/{nome}-{id}", "~/routehandler/staff.aspx", true); }
protected void Application_Start(object sender, EventArgs e) { //Istanzio la classe per l'aggiornamento delle statistiche del database in background _backgroundProcess = new BackgroundProcess(); RouteTable.Routes.RouteExistingFiles = false; #region Pagine pubbliche RouteTable.Routes.MapPageRoute(RouteNameEnum.AccessPage.ToString(), "{lang}/access", "~/publicpages/accesspage.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.Home.ToString(), "{lang}/home", "~/publicpages/default.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.Category.ToString(), "{lang}/category/{*category}", "~/publicpages/category.aspx", true, new RouteValueDictionary { {"lang", "it"}, {"category", string.Empty} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.Contacts.ToString(), "{lang}/contacts", "~/publicpages/contacts.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.Brand.ToString(), "{lang}/brand", "~/publicpages/brand.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.News.ToString(), "{lang}/news", "~/publicpages/news.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.Login.ToString(), "{lang}/login", "~/publicpages/login.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.Subscription.ToString(), "{lang}/subscription", "~/publicpages/subscription.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.SubscriptionConfirm.ToString(), "{lang}/subscriptionconfirm", "~/publicpages/subscriptionconfirm.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.SubscriptionSuccess.ToString(), "{lang}/subscriptionsuccess", "~/publicpages/subscriptionsuccess.aspx", true, new RouteValueDictionary { {"lang", "it"} }); #endregion #region Pagine utenti RouteTable.Routes.MapPageRoute(RouteNameEnum.UsersHome.ToString(), "{lang}/users/home", "~/users/default.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.UsersOrders.ToString(), "{lang}/users/orders", "~/users/orders.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.UsersPersonalData.ToString(), "{lang}/users/personaldata", "~/users/personaldata.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.UsersWaitingPayment.ToString(), "{lang}/users/waitingpayment", "~/users/waitingpayment.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.UsersCart.ToString(), "{lang}/users/cart", "~/users/cart.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.UsersCartProcess.ToString(), "{lang}/users/cartprocess", "~/users/cartprocess.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.UsersCartSuccess.ToString(), "{lang}/users/cartsuccess", "~/users/cartsuccess.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.UsersCartPaypalPaymentSuccess.ToString(), "{lang}/users/paypalpaymentsuccess", "~/users/paypalpaymentsuccess.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.UsersInvoices.ToString(), "{lang}/users/invoices", "~/users/invoices.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.UsersShipping.ToString(), "{lang}/users/shipping", "~/users/shipping.aspx", true, new RouteValueDictionary { {"lang", "it"} }); #endregion #region Pagine delivery RouteTable.Routes.MapPageRoute(RouteNameEnum.DeliveryHome.ToString(), "{lang}/delivery/home", "~/delivery/default.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.DeliveryOrdersPaid.ToString(), "{lang}/delivery/orderspaid", "~/delivery/orderspaid.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.DeliveryOrdersItems.ToString(), "{lang}/delivery/ordersitems", "~/delivery/ordersitems.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.DeliveryOrdersEscaped.ToString(), "{lang}/delivery/ordersescaped", "~/delivery/ordersescaped.aspx", true, new RouteValueDictionary { {"lang", "it"} }); #endregion #region Pagine accounting (contabile) RouteTable.Routes.MapPageRoute(RouteNameEnum.AccountingHome.ToString(), "{lang}/accounting/home", "~/accounting/default.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.AccountingConfirmPayments.ToString(), "{lang}/accounting/confirmpayments", "~/accounting/confirmpayments.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.AccountingPaypalPayments.ToString(), "{lang}/accounting/paypalpayments", "~/accounting/paypalpayments.aspx", true, new RouteValueDictionary { {"lang", "it"} }); RouteTable.Routes.MapPageRoute(RouteNameEnum.AccountingUploadInvoices.ToString(), "{lang}/accounting/uploadinvoices", "~/accounting/uploadinvoices.aspx", true, new RouteValueDictionary { {"lang", "it"} }); #endregion //Gli handler globali devono rimanere in fondo alla pagina //Handler pagine personali RouteTable.Routes.MapPageRoute(RouteNameEnum.UserPage.ToString(), "{lang}/page/{userpage}", "~/publicpages/personalpage.aspx", true, new RouteValueDictionary { {"lang", "it"} }); //Handler pagine prodotti RouteTable.Routes.MapPageRoute(RouteNameEnum.Item.ToString(), "{lang}/item/{item}", "~/publicpages/item.aspx", true, new RouteValueDictionary { {"lang", "it"}, {"item", string.Empty} }); //Handler pagine news RouteTable.Routes.MapPageRoute(RouteNameEnum.NewsItem.ToString(), "{lang}/news/{item}", "~/publicpages/newsitem.aspx", true, new RouteValueDictionary { {"lang", "it"}, {"item", string.Empty} }); }