Files
ProductiveAspNetMvc/Ch03/03_Challenge/Website/App_Start/RouteConfig.cs
Jess Chadwick 20458e435e Exercise Files
2018-06-07 00:03:24 -04:00

26 lines
626 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace HPlusSports
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapMvcAttributeRoutes();
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
}