货币格式字符串在Asp.net GridView模板字段中不起作用 [英] Currency formatstring Not Working in Asp.net GridView Template Field
本文介绍了货币格式字符串在Asp.net GridView模板字段中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
货币格式字符串在Asp.net中不起作用GridView模板字段
下面的代码在价格之前不显示$(货币符号)符号
Currency formatstring Not Working in Asp.net GridView Template Field
Below code Not Showing $(Currency symbol) symbol before Price
<asp:TemplateField HeaderText="Price">
<ItemTemplate>
<asp:Label ID="lblPrice" runat="server" Text='<%# Eval("Price","{0:C}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
以上代码价格前没有显示$(货币符号)符号
谢谢
bajid
Above code Not Showing $(Currency symbol) symbol before Price
Thanks
bajid
推荐答案
(货币符号)符号之前价格
(Currency symbol) symbol before Price
<asp:TemplateField HeaderText="Price">
<ItemTemplate>
<asp:Label ID="lblPrice" runat="server" Text='<%# Eval("Price","{0:C}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
以上代码未显示
Above code Not Showing
(货币符号)符号价格
谢谢
bajid
(Currency symbol) symbol before Price
Thanks
bajid
查看此链接...
http://humrahimcs.wordpress.com/2010/09/21/how-to-add-currency-symbol-in-gridview-priceamount -column / [ ^ ]
check this link...
http://humrahimcs.wordpress.com/2010/09/21/how-to-add-currency-symbol-in-gridview-priceamount-column/[^]
这篇关于货币格式字符串在Asp.net GridView模板字段中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文