我System.Web.Routing
在 Asp.Net Webform 应用程序中使用。我在global.asax
routes.RouteExistingFiles = true; // I made true/false both, but none works
routes.Add("competition", new Route
(
"Test",
new CustomRouteHandler("~/Test/WebForm1.aspx")
));
目录结构如下:-
应用
|
|--- 测试(文件夹)
|--- Webform1.aspx
当我在浏览器中编写时http://localhost:xxxx/Test/
(使用 Casini),请求以传统方式而不是通过路由处理,并且它给了我“目录列表 - /test/”页面。
你能帮帮我吗?