2012-08-01 80 views

回答

26

您可以试试这种格式,并用自定义值替换金额。

@string.Format("{0:C}", amount); 
+0

感谢它workd! :) – 2012-08-01 06:44:56

9

你可以在模型中添加此,货币符号将随时显示你引用的那场

[DisplayFormat(DataFormatString = "{0:C}", ApplyFormatInEditMode = true)] 
    public decimal DebitAmount { get; set; }