Asp.net mvc 从URL将URL映射到ASP.NET MVC 2中的空路由。URL显示空白页

Asp.net mvc 从URL将URL映射到ASP.NET MVC 2中的空路由。URL显示空白页,asp.net-mvc,asp.net-mvc-2,routes,url-routing,maproute,Asp.net Mvc,Asp.net Mvc 2,Routes,Url Routing,Maproute,如果URL是 它显示主页 如果URL是 它显示空白页 以下是我们使用的路线 routes.MapRoute( "HomePage", "Test2", new { controller = "Home", action = "Index", id = "", title = UrlParameter.Optional } ); routes.MapRoute(

如果URL是

它显示主页

如果URL是

它显示空白页


以下是我们使用的路线

routes.MapRoute(
              "HomePage",
              "Test2",
              new { controller = "Home", action = "Index", id = "", title = UrlParameter.Optional }
          );
            routes.MapRoute(
            "ProductDetails", // Route name
            "Test2/", // URL with parameters
            new { controller = "Home", action = "Index", id = "", title = UrlParameter.Optional } // Parameter defaults
            );
            routes.MapRoute(
                "Default",
                "Test2/{controller}/{action}/{id}",
                new { controller = "Home", action = "Index", id = "1" }
            );


如果我们尝试以下网址,它的工作很好

routes.MapRoute(
            "ProductDetails", // Route name
            "Test2/{'}", // URL with *** ' *** parameters
            new { controller = "Home", action = "Index", id = "", title = UrlParameter.Optional } // Parameter defaults
            );

我们已经创建了一个虚拟页面作为空白页面,并添加了响应。重定向到主页 这不是问题的解决方案,但我们已经解决了