First I've heard of ValueFor
as well....however, looking at the source it would appear that ValueFor
does a simple render using only the metadata against the model ignoring any associated templates (built-in or custom).
Further digging shows that in actual fact, the result of ValueFor
is the equivalent to calling String.Format
or Convert.ToString
using the current culture depending on whether you provide a custom format
@Html.ValueFor(x => x.Amount) = Convert.ToString(x.Amount, CultureInfo.CurrentCulture)
@Html.ValueFor(x => x.Amount, "0.00") = String.Format(x.Amount, "0.00", CultureInfo.CurrentCulture)