<asp:BoundField DataField="QianShouEr" HeaderText="欠收额(元)" DataFormatString="{0:C}" HtmlEncode="false">
                        <HeaderStyle BorderColor="Black" BorderWidth="1px" HorizontalAlign="Center" VerticalAlign="Middle"
                            Width="70px" />
                        <ItemStyle BorderColor="Black" BorderWidth="1px" ForeColor="Red" HorizontalAlign="Center"
                            Width="75px" />
</asp:BoundField>

页面显示为:¥23,456.00。

要求转换成Decimal/double格式进行数学运算

方法如下:

string b=¥23,456.00;

decimal   c   =   Convert.ToDecimal(b.Replace( "¥ ",   " ").trim());

this.lblYSE.Text = c.ToString("C");

页面显示为:¥23,456.00。


 

相关文章:

  • 2021-08-05
  • 2021-06-29
  • 2022-12-23
  • 2021-04-23
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-08-21
猜你喜欢
  • 2021-10-11
  • 2022-12-23
  • 2021-08-14
  • 2021-12-15
  • 2021-12-29
相关资源
相似解决方案