I have a URL in a string format that I want to parse to get relevant route values. I can parse the string manually, but I want to use my routing configuration, so I am not tied to a specific string format (so that I can easily change the format of the URL).
I am trying to use the GetRouteData method for RouteCollection, but this requires the HttpContextBase parameter. Obviously this works fine when the url is the current url, but I need to be able to pass any url.
In my routing modulation tests, I cheat on HttpContextBase, but I don't want to do this in production code!
Any ideas?
source
share