2021-09-07 23:40:58 +10:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Web;
|
|
|
|
|
using System.Web.Mvc;
|
|
|
|
|
using System.Web.Routing;
|
2021-09-08 15:53:41 +10:00
|
|
|
|
using System.Web.UI;
|
2021-09-07 23:40:58 +10:00
|
|
|
|
|
|
|
|
|
namespace SportsStore.WebUI
|
|
|
|
|
{
|
|
|
|
|
public class RouteConfig
|
|
|
|
|
{
|
|
|
|
|
public static void RegisterRoutes(RouteCollection routes)
|
|
|
|
|
{
|
|
|
|
|
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
|
|
|
|
|
2021-09-08 15:53:41 +10:00
|
|
|
|
routes.MapRoute(
|
|
|
|
|
name: null,
|
|
|
|
|
url: "Page{page}",
|
|
|
|
|
defaults: new { Controller = "Product", action = "List"}
|
|
|
|
|
);
|
|
|
|
|
|
2021-09-07 23:40:58 +10:00
|
|
|
|
routes.MapRoute(
|
|
|
|
|
name: "Default",
|
|
|
|
|
url: "{controller}/{action}/{id}",
|
2021-09-08 11:06:25 +10:00
|
|
|
|
defaults: new { controller = "Product", action = "List", id = UrlParameter.Optional }
|
2021-09-07 23:40:58 +10:00
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|