Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 url 中有 mvc action_name 加上文件扩展名,/Home/Index.aspx而不是/Home/Index; 哪个路由到主控制器的索引操作。有谁能够帮助我。有没有人有任何意见或指导?
/Home/Index.aspx
/Home/Index
routes.MapRoute( "RouteName", // Route name "{controller}/{action}.aspx", // URL with parameters new { controller = "Home", action = "Index"} // Parameter defaults );
你不能这样做吗