【发布时间】:2013-12-24 02:55:14
【问题描述】:
asp.net-mvc4 的默认值为http://domainname.com/products/1,带有路由
routes.MapRoute(
name: "Products",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Products", action = "Index", id = UrlParameter.Optional }
);
我想重写为具有 .html 扩展名的http://domainname.com/products/1.html。
对此有何想法?
【问题讨论】:
-
您为什么要这样做?您没有在此处处理文件。
-
我不想这样做,但这是客户的想法
标签: c# asp.net-mvc asp.net-mvc-4 routes