e.g. i have a class
public class Car
{
public string Name { get; set; }
public string Brand { get; set; }
public string Color { get; set; }
}
and i have a view with a model as a list
@model IEnumerable<Car>
Now i want to display the raw displayName of a property of a listItem (model).
Example code:
@model IEnumerable<Car>
//(..)
<thead>
<tr>
<th>"[@Html.DisplayName(Model.First().Name))]"</th>
<th>Brand</th>
<th>Color</th>
</tr>
</thead>
How can I do it?
UPDATE
I found the solution in creating a new helper class: click me