If you can not turn on wildcard mapping for IIS (shared hosting) or can not be bothered (lazy) Can you still use ASP.NET routing if your routes end in one of the "known" ASP.X extensions ... like ending all routes with ASX, APPX etc?
, example of this example:
var Margandler = new WebFormRouteHandler & lt; Page & gt; ("~ / MyPage.aspx"); way. Add (new route ("{page}", marghandler)); way. Add (new route ("Account services / {pages}", Marghandler)); way. Add (new route ("Default.aspx", Marghandler)); Without wildcard mapping, this can be done:
var Margandler = new webformout handler < Page & gt; ("~ / MyPage.aspx"); way. Add (new route ("{page} / view.ashx", Margandler)); way. Add (new route ("account service / {page} / view.aspx", marghandler)); way. Add (new route ("Default.aspx", Marghandler)); I'm thinking that its last route is the default.aspx, but it does not include any root data with it ... Is there a better way? It works, it looks like the best idea as if the application has been moved or wildcard mapping can be done, only the routes need to be changed ...
Yes it works ... there is still an annoying extension that includes ... but it works.
Comments
Post a Comment