MapRoute(
string name, 名稱
string url,URL 模式
object defaults, 默認值
object constraints, 約束(用正則表達式)
string[] namespaces 命名空間
)
如果一個URL能夠在多個路由中匹配,則默認使用第一個匹配的路由
routes.MapRoute( name: "Test5", url: "{year}/{month}/{day}/Details.aspx", defaults: new { controller = "Work", action = "Index", id = UrlParameter.Optional }, constraints:new {year=@"\d{4}",month=@"\d{4}",day=@"\d{2}"} );