开发者

How to parse a url string using mvc2 routes

I'd like to know if there is a simple way of building a RouteValueDictionary from a url. For exam开发者_JS百科ple if I have a url http://www.site.com/controllerA/actionB/idC, then how can I extract the RouteValueDictionary where the item with the key controller would have the value of controllerA.

Note this isn't for testing so I don't want to use mocking and the solution here does not seem to be working.


It seems this was never an issue addressed by MVC so I have written by own URL parser. Although reflector does help a bit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜