一.nop中的路由注冊
在Global.asax,Application_Start()方法中會進(jìn)行路由注冊,代碼如下。
1 public static void RegisterRoutes(RouteCollection routes) 2 { 3 routes.IgnoreRoute("favicon.ico"); 4 routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 5 6 //register custom routes (plugins, etc) 7 var routePublisher = EngineContext.Current.Resolve<IRoutePublisher>(); 8 routePublisher.RegisterRoutes(routes); 9 10 routes.MapRoute( 11 "Default", // Route name 12 "{controller}/{action}/{id}", // URL with parameters 13 &