asp.net mvc中配置路由默认值(Area中)
2021-06-09 07:01
标签:string dex bsp register color res url log collect asp.net mvc中配置路由默认值(Area中) 标签:string dex bsp register color res url log collect 原文地址:http://www.cnblogs.com/gaocong/p/7301250.html public class RouteConfig
{
private static string[] namespaces = new string[1] { "Best.Site.Areas.BestPalace" };
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("ActiveReports.ReportService.asmx/{*pathInfo}");
routes.IgnoreRoute("ActiveReportService.asmx/{*pathInfo}");
routes.IgnoreRoute("{*allActiveReport}", new { allActiveReport = @".*\.ar10(/.*)?" });
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}"
,
defaults: new { controller = "MenuAddress", action = "Index", id = UrlParameter.Optional },
namespaces: namespaces
).DataTokens["area"] = "BestPalace";
}
}
文章标题:asp.net mvc中配置路由默认值(Area中)
文章链接:http://soscw.com/index.php/essay/92566.html