首先在web.config的<system.web>添加<globalization>元素,其内容为:
<globalization requestEncoding="GB2312" responseEncoding="GB2312" culture="zh-CN"/>
   其次,在Eval表达式中,可以使用{0:c}格式参数指定单价中数据显示的格式。如:<%# Eval("Price", "{0:c}")%>,priceLabel.Text = String.Format("{0:c}", pd.Price);。打开IE看到的效果为:Price:  ¥16.90

相关文章:

  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2021-04-24
  • 2021-08-12
  • 2021-11-10
  • 2021-08-06
猜你喜欢
  • 2021-11-05
  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案