-1
I’m working on ASP.NET Core MVC
and C#
.
I needed to present the number, e.g., (double) 1000, as 1,000, when presently the number is presented as 1000 .
The property in the model is as:
[DisplayFormat(DataFormatString = "{0:#,###}")]
public double? Kms_Contrato { get; set; }
(looks like the formatting {0:#,###}
doesn’t work...)
In the views the property is written as:
@model MyType
<td>@Model.Kms_Contrato</td>
and
@model MyType
Html.EditorFor(m => m.Kms_Contrato)
How can I do?
This solution does not work!!!! (double) 90000is presented as 90000!!!
– JDias