I have created a table for tax ranges. Now I want to display the amounts formatted like so: $100,000
. How can I do this?
Tip: You can also press Ctrl+1 to open the Format Cells dialog box. In the Format Cells dialog box, in the Category list, click Currency or Accounting. In the Symbol box, click the currency symbol that you want. Note: If you want to display a monetary value without a currency symbol, you can click None.
It is composed of the country code ( US ), followed by the letter "D" for "dollar." Write the code first, followed by a non-breaking space and the dollar figure: USD 350 million.
You could try this format, and replace amount with custom value.
@string.Format("{0:C}", amount);
You could add this in your model, the currency symbol will be displayed anytime you reference that field
[DisplayFormat(DataFormatString = "{0:C}", ApplyFormatInEditMode = true)] public decimal DebitAmount { get; set; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With