Reputation: 5459
I am trying to display some currency with the Euro symbol. It seems I am doing something wrong because it is not working. This is my code:
[DisplayFormat(DataFormatString="{0:N}")]
public decimal Price { get; set; }
This is how it is curently displayed: 9.9900.
This is how I would like it to be displayed : €9.99
What am I doing wrong and how can I correct it?
Upvotes: 1
Views: 162
Reputation: 21881
use the currency formatter e.g.
[DisplayFormat(DataFormatString="{0:C}")]
public decimal Price { get; set; }
Upvotes: 2