2010-12-14 42 views

回答

1

變化在Global.asax路徑模板

會有類似

public static void RegisterRoutes(RouteCollection routes) 
     { 
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 
      routes.MapRoute(
       "Default", // Route name 
       "{controller}/{action}/{id}", // route 
new { controller = "Home", action = "Index", id = UrlParameter.Optional }); // defaults 
} 

改變爲類似

public static void RegisterRoutes(RouteCollection routes) 
     { 
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 
      routes.MapRoute(
       "Default", // Route name 
       "{action}/{id}", 
new { controller = "Home", action = "Index", id = UrlParameter.Optional }); 
} 
相關問題