routes.MapRoute("catchallroute", "{controller}/{action}/{*extrastuff}", new QueryRouteHandler);
 我在网上看到关于MVC路由匹配多参数写法如果
 实现没看懂。
 QueryRouteHandler 这东西是什么
 求教
 MVC路由匹配多参数写法

解决方案 »

  1.   

    看看mvc 的基础都会讲到的
      

  2.   

    routes.MapRoute(
                    "news",
                    "news.ashx/newlist/{year}/{day}",
                    new { controller = "news", action = "newlist", year = "year", day = "year" }
                    );            routes.MapRoute(
                    "Default",                                              // Route name
                    "{controller}.ashx/{action}/{id}",                           // URL with parameters
                    new { controller = "Home", action = "Index", id = "" }  // Parameter defaults
                );
      

  3.   

    后面参数也不固定,ACTION也不一定全部匹配有这种写法吗。