ASP.NET中的Gridview修剪错误 [英] Gridview Trim Error in ASP.NET
本文介绍了ASP.NET中的Gridview修剪错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的参考问题; String.Format相同代码的不同视图
This is my reference question; String.Format Same Code Different View
当我尝试此代码时;
var cultureWithoutCurrencySymbol =
(CultureInfo)CultureInfo.CurrentCulture.Clone();
cultureWithoutCurrencySymbol.NumberFormat.CurrencySymbol = "";
GridView1.FooterRow.Cells[9].Text = String.Format(cultureWithoutCurrencySymbol, "{0:c}", sumMV).Trim();
我收到这样的错误;
我该如何解决这个问题? 我的代码有问题吗?
How can i solve this problem? Is it something wrong in my code?
推荐答案
既然您想要没有符号的货币,为什么不简单使用:
Since you want currency without symbol why don't simply use:
sumVM.ToString()
这篇关于ASP.NET中的Gridview修剪错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文