Is it possible to parse a URL into it's composite components?

Posted by Paul Alexander on Stack Overflow See other posts from Stack Overflow or by Paul Alexander
Published on 2010-03-13T18:02:06Z Indexed on 2010/03/13 18:05 UTC
Read the original article Hit count: 279

Filed under:
|
|

I'd like to parse an incoming URL into it's component parts for some pre-processing before passing it into the standard MVC routing logic. For example given your standard route

{controller}/{action}/{id}

and the URL

/user/show/10

Is there a way to have the Routing system return a dictionary containing controller, action and id keys with their corresponding values?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about routing