Write custom html helper

The RouteValueDictionary uses the TypeDescriptor infrastructure ( (obj) ) to reflect the additionalViewData object. As this infrastructure is extensible, you can create a class that implements the ICustomTypeDescriptor and provides fake properties of your choice, . based on an internal dictionary. In the following article you will find an implementation: http:///Forums/en/wpf/thread/027cb000-996e-46eb-9ebf-9c41b07d5daa Having this implementation you can easily add "properties" with arbitrary name and value and pass it as the addtionalViewData object. To get the existing properties from the initial object you can use the same method as MVC will do later, call the , enumerate the properties and get the name and value of the property, and add them to your new "object" as well.

Write custom html helper

write custom html helper


write custom html helperwrite custom html helperwrite custom html helperwrite custom html helper