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