我想将 $ 显示为销售价格,为此我完成了
<asp:Label ID="lblpriceValue" runat="server" Text='<%#string.Format("{0:c}",Eval("product_price")) %>'/>
但这没有在货币前显示 $ 或任何其他符号 所以暂时我在标签前添加了 $ 符号,比如
$<asp:Label ID="lblpriceValue" runat="server" Text='<%#string.Format("{0:c}",Eval("product_price")) %>'/>
但我知道这是错误的,因为我想根据国家/地区设置货币符号。
我该怎么做。
请您参考如下方法:
yourMoneyType.ToString("c");
