我正在尝试使用 mvc.net 中的路由向我的应用程序添加一个区域。对于控制器我添加:
routes.MapRoute(
"Area1", // Route name
"Area1/{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
Run Code Online (Sandbox Code Playgroud)
我如何以相同的方式路由 css/js 文件,即我想要去area1/content/site.css或 /content/site.css去/content/area1/site.css .
谢谢