What is the use of AdditionalMetadata Attribute in MVC 3 . What is Use of that? Please provide me clear example how to specify and use it to render in browser.
Thanks!!!
What is the use of AdditionalMetadata Attribute in MVC 3 . What is Use of that? Please provide me clear example how to specify and use it to render in browser.
Thanks!!!
It could be used to specify some custom properties that are not part of the standard metadata properties. Here's an article which illustrates an example.
Another option (and in my opinion a little bit cleaner, but it depends) is to use them through custom model metadata providers.
Here is one example of it.
Basically they are used for providing custom values from the model to the views, without requiring views to include logic to make these values up for themselves. Which results in a little bit cleaner and more generic views.