Gridview Trim Error in ASP.NET

99封情书 提交于 2019-12-25 08:36:52

问题


This is my reference question; String.Format Same Code Different View

When i try this code;

var cultureWithoutCurrencySymbol =
        (CultureInfo)CultureInfo.CurrentCulture.Clone();
            cultureWithoutCurrencySymbol.NumberFormat.CurrencySymbol = "";
            GridView1.FooterRow.Cells[9].Text = String.Format(cultureWithoutCurrencySymbol, "{0:c}", sumMV).Trim();

I gettin an error like this;

How can i solve this problem? Is it something wrong in my code?


回答1:


Since you want currency without symbol why don't simply use:

sumVM.ToString()


来源:https://stackoverflow.com/questions/5712356/gridview-trim-error-in-asp-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!