注册 | 登录 | 设为首页 | 加入收藏
您当前的位置:飞翔学院-IT中国 → 编程开发.Net/C# → 文章内容

C#2.0中 GridView日期列使用DataFormatString="{0:d}",没有任何变化

作者:佚名 来源:本站整理 发布时间:2007-10-23 15:41:33

GridView日期列使用DataFormatString="{0:d}",没有任何变化?依然显示“2006-3-30 0:00:00”

 <asp:BoundField DataField="SignedDate" HeaderText="签订日期" DataFormatString="{0:d}" >

没有变化 应该加上

HtmlEncode="false" ,DataFormatString的设置才会生效。

 <asp:BoundField DataField="SignedDate" HeaderText="签订日期" DataFormatString="{0:d}" HtmlEncode="false"/>

后显示 2006-3-30


  • 打印文档
  • 推荐好友
  • 返回顶部
  • 增大字体
  • 减少字体

热点文章

关于本站 | 工作机会 | 合作网站 | 广告服务 | 市场合作| 联系我们 | 抽奖活动
版权所有: 武汉威俊科技有限公司 Copyright 2005-2007 www.ITCNW.COM All rights reserved