请教一个 MVC 自定义路由的问题

2024-12-02 18:04:56
推荐回答(1个)
回答1:

routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);