今天用GridView来显示数据,利用DataFormatString格式化列信息,可是发现页面并没有任何编码,格式化没有效果,最后查资料才知道。ASP.NET2.0出于安全性的考虑,除了设置DataFormatString,还需要设置 HtmlEncode = false 才可以。

相关文章:

  • 2022-02-26
  • 2022-02-01
  • 2022-02-27
  • 2022-12-23
猜你喜欢
  • 2021-05-16
  • 2022-12-23
  • 2021-10-25
  • 2022-02-04
  • 2021-06-25
  • 2021-12-01
相关资源
相似解决方案