Html.DisplayFor
stopped displaying the display name and the formatted string... My code is bellow ... any ideas? i have searched around any couldn't find anything. thanks
[DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}")]
[Display(Name = "Date")]
public DateTime EventDateTimeDay { get; set; }
[Display(Name = "Seconds")]
[DisplayFormat(DataFormatString = "{0:0.00} s")]
public double Duration { get; set; }
Razor .cshtml:
@model IEnumerable<OurClass>
...
<th>
@Html.DisplayNameFor(model => model.EventDateTimeDay)
</th>
...
@foreach (var item in Model)
{
...
<td>
@Html.DisplayFor(modelItem => item.EventDateTimeDay)
</td>