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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -