I get a URL string (not the current route) in my action, I want to know how my routes definitions will parse the URL into Area
, Controller
and Action
example:
"http://website.com/Selling/Products/UpdateProduct/2"
area == "Selling"
controller == "Products"
action == "UpdateProduct"
I saw this answer from 2-12-2009 with a way how to do it, but it's verbose:
it creates HttpRequst
, HttpResponse
, HttpContext
and HttpContextWrapper
! for a simple operation, that doesn't really need HTTP context environment.
Is there a better way today with Asp.Net-Mvc3
?