And this work. Dont know how, if anyone can explain?
Passing name paramter with null or empty in Url.Route method causes the same effect as you call this overload of
RouteCollection.GetVirtualPath(which internally does not care name paramter if it is null or empty, and uses another overload
RouteCollection.GetVirtualPath).
Note: Web host abstract the usage of RouteCollection class using HttpRouteCollection class. Although, the self host does not use RouteCollection class but the behaviour is same(AFAIK). See this for
detail.
"And whoever is removed away from the Fire and admitted to Paradise, he indeed is successful." (The Holy Quran)
Excellent Windows VPS Hosting Imran Baloch MVP, MVB, MCP, MCTS, MCPD
imran_ku07
All-Star
45815 Points
7698 Posts
MVP
Re: Url.Route method throwing exception
Apr 06, 2012 03:45 AM|LINK
Passing name paramter with null or empty in Url.Route method causes the same effect as you call this overload of RouteCollection.GetVirtualPath(which internally does not care name paramter if it is null or empty, and uses another overload RouteCollection.GetVirtualPath).
Note: Web host abstract the usage of RouteCollection class using HttpRouteCollection class. Although, the self host does not use RouteCollection class but the behaviour is same(AFAIK). See this for detail.
Excellent Windows VPS Hosting
Imran Baloch MVP, MVB, MCP, MCTS, MCPD