HTML.DisplayFor was added in ASP.NET MVC 2 to improve upon HTML.Display, with the main difference being that DisplayFor will give compiletime errors and Display will give runtime errors.
Questions tagged [displayfor]
40 questions
8
votes
2 answers
Slow DisplayFor performance in ASP.NET Core MVC
In my current application I'm generating a fairly lengthy table to display to the user. I've been seeing some serious performance issues with it, which I've tracked down to usage of @Html.DisplayFor, and I'm not entirely sure why.
Edit: I've…

Doddler
- 93
- 1
- 7
7
votes
3 answers
ASP.NET MVC. How use DisplayNameFor in order to create a table heading and body?
How get a property display name using DisplayNameFor()to build a table header. for instance:
@model IEnumerable-
@Html.DisplayNameFor(? => ?.prop1) | …@Html.DisplayFor(modelItem => item.mapLocations.Count) | Is it possible to create an ActionLink for this above…