root/branches/Emisje/eCard/eCardMVC/Platnosci/Global.asax.cs @ 895

Wersja 895, 1.5 KB (wprowadzona przez sylwek, 16 years temu)

Re #195 merged with latest trunk

RevLine 
[866]1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Web;
5using System.Web.Mvc;
6using System.Web.Routing;
7using System.Threading;
8using System.Globalization;
[895]9using System.Configuration;
[866]10
11namespace Platnosci
12{
13    // Note: For instructions on enabling IIS6 or IIS7 classic mode,
14    // visit http://go.microsoft.com/?LinkId=9394801
15
16    public class MvcApplication : System.Web.HttpApplication
17    {
18        public static void RegisterRoutes(RouteCollection routes)
19        {
[895]20            routes.IgnoreRoute("elmah.axd");
[866]21            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
[895]22            string lang = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName.ToLower();
23           
[866]24            routes.MapRoute(
[895]25                "eCard",                                           
26                "eCard/Status.aspx",                               
27                new { controller = "Platnosc", action = "Status" } 
28            );           
[866]29            routes.MapRoute(
[895]30                "Default",                                                               
31                "{language}/{controller}/{action}/{id}",                                 
32                new { language = lang, controller = "Home", action = "Index", id = "" } 
33            );           
[866]34        }
35        protected void Application_Start()
36        {
37            RegisterRoutes(RouteTable.Routes);
38        }
[895]39     
[866]40    }
41}
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.