The problem you're encountering is that LabelFor
doesn't write out the value of the property, it writes out a label associated with it. By default, this is simply the property name, but can be overriden using the DisplayAttribute
or DisplayNameAttribute
on your model property.
In your example above, this will always result in the same value being written out, because it's the same model property in every iteration.
If you want to write out the value of the property, use DisplayFor
:
@Html.DisplayFor(p => p.Name)
Or, simply:
@Model.Name