How to render ModelMetadata object using Html.Displar in Razor-engine in ASP.NET MVC app?
问题 I am trying to utilize the DisplayTemplates feature in razor-engine to automate rendering my display views. I scan my Model to find the correct ModelMetadata for each property that I want to display. But I am not able to render the properties using Html.DisplayFor correctly. I tried to display my property like so // First I find the ModelMetadata for the property // I call this statement in a loop and each iteration I pass a different PropertyName to get the correct model ModelMetadata