Is there a reason /Views/Shared/DisplayTemplates/Object.cshtml
is not being picked up by views when calling @Html.DisplayFor(x => x.Date)
?
If I name the file DateTime.cshtml
it is picked up by DateTime
properties as is, but I don't want to have to create a template for each type. Shouldn't Object.cshtml
just be used for everything?
I have not decorated the properties with any attributes.
The view's code:
@model Object
<div>
<strong>@Model</strong>
</div>