在GridView中设置DataFormatString
来源:互联网 发布:淘宝图片空间怎么清理 编辑:程序博客网 时间:2024/05/06 20:35
今天在对某一个DateTime列作字段格式化的时候,碰到一个很奇怪的问题。明明是设定了DataFormatString属性格式的,但是在网页中不起作用。最后把HtmlEncode设置为false才解决这个问题。
经过MSDN帮助文件查找:
如果在 BoundField 对象中显示字段值之前,对这些字段值进行 HTML 编码,则为 true;否则为 false。默认为 true。
备注
使用 HtmlEncode 属性指定在 BoundField 对象中显示字段值之前,是否对这些字段值进行 HTML 编码。
注意
经过 HTML 编码的字段值有助于防止跨站点的脚本攻击,还可以防止显示恶意内容。只要有可能就应该启用该属性。
- 在GridView中设置DataFormatString
- GridView中设置DataFormatString无效的解决方法
- GridView中设置DataFormatString无效的解决方法
- GridView 设置DataFormatString
- gridview设置DataFormatString
- gridview设置DataFormatString
- gridview设置DataFormatString格式
- GridView的dataformatstring设置
- GridView 中 DataFormatString
- ASP.NET 2.0中Gridview利用DataFormatString属性设置数据格式
- ASP.NET 2.0中Gridview利用DataFormatString属性设置数据格式
- ASP.NET 2.0中Gridview利用DataFormatString属性设置数据格式
- 2005中关于在GridView 的DataFormatString属性
- GridView 中 DataFormatString 的使用
- GridView 中 DataFormatString 的使用
- GridView 中 DataFormatString 的使用
- GridView 中 DataFormatString 的使用
- Gridview利用DataFormatString属性设置数据格式
- struts2+hibernate+spring2.5用properties集成整合配置方法
- Js框架介绍及比较
- 世事浮沉
- 240个jquery插件
- 对回调函数进行简单封装
- 在GridView中设置DataFormatString
- Base64算法详解和实现
- struts中css与js路径问题
- How to access SMTP/POP server using telnet - 用 Telnet 如何访问邮件服务器
- 用CArchive类和CFile类存储普通类或结构
- 一些你不能错过的港片
- tomcat下rar,zip,txt,doc等文件直接打开的问题
- Eclipse/MyEclipse默认workspace路径设置
- window.location.href不起作用的原因分析