我正在尝试切换现有的webforms应用程序以使用路由,并希望分阶段执行。但是,我遇到了一些特定路线的问题:
//I want to catch existing calls to .aspx pages, but force them through
// a route, so I can eventually drop the .aspx extension
new Route("{page}.aspx", new MyCustomRoute());
这根本不起作用,就像对[somepage]的调用一样。aspx永远不会绊倒这个路由…如果我把路线改成这样:
//Same thing sans .aspx extension
new Route("{page}", new MyCustomRoute());
所有打给[某个页面]的电话都会被接听。有什么想法吗?