I have code that builds Urls in ASP.NET MVC3 using a RouteValueDictionary and UrlHelper. The problem that I am running into is that MVC calls ToString() on the types in the dictionary. For a particular type I am using, this is not the value that I want to be in the Uri. I cannot change the ToString implementation.
I understand how to create a ModelBinder to handle the deserialization from the Uri, but not the serialization part. How and what do I register in order to control how a type is converted to the Uri parameter?
Thanks, Erick