ASP NET MVC custom route fallback

Posted by manudea on Stack Overflow See other posts from Stack Overflow or by manudea
Published on 2010-06-05T13:15:19Z Indexed on 2010/06/05 13:22 UTC
Read the original article Hit count: 315

Filed under:
|
|

I'm wondering if it is possibile to customize routing in a way that all requests are evaluated by a piece of code, redirected to the relevant controller if a match is found or passed to next rout in list if not found.

sample request: /my coolpage/another one

the code searches and determine that the right controller for this is Page, action is "list" and id is "123" and so redirects

another request: /products/list/5

code finds no match al passes it back to next route that knows how to handle it...

any idea on how to do this?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about mvc