c# - Display Euro format In ViewModel -
i need display euro value decimal value stored in sql-server database.
the value comes database this: 10000,0000 , need display this: 10.000,00 €
how can this?
i tried formatting viewmodel:
[displayformat(dataformatstring = "{0:c}")] public decimal price { get; set; }
and display this:
@html.displayfor(modelitem => item.price)
but ¤10,000.00
any suggestions?
thanks.
[displayformat(dataformatstring = "{0:n} €")]
"{0:c}" using current culture information (currency) format value.
Comments
Post a Comment