I work in a webforms application using routing in .net 4. I defined a very simple route in global.asax as follows:
RouteTable.Routes.MapPageRoute("myRouteName", "MyRoutePath", "~/RouteHandlers/MyHandler.aspx");
In the code block of one of my pages, I use GetRouteUrl to create a URL for this named route as follows:
Response.RedirectPermanent(GetRouteUrl("myRouteName"));
This does not give the expected result http://sitename/MyRoutePath . Instead, it creates http://sitename/MyRoutePath?length=15
The length parameter doesn't seem to hurt, but I spent a lot of time making the URLs look beautiful, so I don't want to see an additional parameter. Any idea how to disable it?
John hoge
source share