惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
SecWiki News
SecWiki News
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
量子位
M
MIT News - Artificial intelligence
GbyAI
GbyAI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
TaoSecurity Blog
TaoSecurity Blog
博客园 - 【当耐特】
H
Heimdal Security Blog
腾讯CDC
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
S
Schneier on Security
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Cybersecurity and Infrastructure Security Agency CISA
S
SegmentFault 最新的问题
大猫的无限游戏
大猫的无限游戏
Application and Cybersecurity Blog
Application and Cybersecurity Blog
F
Full Disclosure
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Threatpost
月光博客
月光博客
A
Arctic Wolf
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
雷峰网
雷峰网
T
Troy Hunt's Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
D
DataBreaches.Net
O
OpenAI News
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
小众软件
小众软件
V
Vulnerabilities – Threatpost
A
About on SuperTechFans
人人都是产品经理
人人都是产品经理
T
The Exploit Database - CXSecurity.com
Martin Fowler
Martin Fowler
美团技术团队
P
Privacy International News Feed

博客园 - 笑傲江湖

客户端使用自定义代理类访问WCF服务 用户中心 - 博客园 .NET 定时执行写日志任务解决方案(Timer & Quartz.Net) 用户中心 - 博客园 任意类型转换成json ASP.net中动态加载控件时一些问题的总结 图片等比例显示 用select做下拉式友情链接及jquery改写 - 笑傲江湖 - 博客园 一个商城的购车相关代码 M| SQL 导入导出的时候数据库表的主键和自动编号丢失 怎么办 .Net通用分页类 存储过程分页 鼠标经过时改变背景颜色 - 笑傲江湖 - 博客园 【JQuery】鼠标经过表格行变色 - 笑傲江湖 - 博客园 ASP实现长文章自动分页的函数代码 - 笑傲江湖 - 博客园 JQuery图片大小自适应 - 笑傲江湖 - 博客园 Visual Studio小技巧:复制代码时,保留原ID eWebEditor编辑器 IE8.0兼容 一个简单的XML的操纵类 asp.net日期格式
GridView、Repeater等数据控件列数字、货币和日期的显示格式 - 笑傲江湖 - 博客园
笑傲江湖 · 2009-05-12 · via 博客园 - 笑傲江湖

当然也适用于其他数据绑定控件,使用方法<%Eval("{0:d}")%>

形式 语法 结果 注释
数字 {0:N2} 12.36  
数字 {0:N0} 13  
货币 {0:c2} $12.36  
货币 {0:c4} $12.3656  
货币 "¥{0:N2}" ¥12.36  
科学计数法 {0:E3} 1.23E+001  
百分数 {0:P} 12.25% P and p present the same.
日期 {0:D} 2006年11月25日  
日期 {0:d} 2006-11-25  
日期 {0:f} 2006年11月25日 10:30  
日期 {0:F} 2006年11月25日 10:30:00  
日期 {0:s} 2006-11-26 10:30:00  
时间 {0:T} 10:30:00  

在设置GridView数据绑定控件的模版列时,总要设置显示的格式,这里是我查询一些资料后统计出来的。还有一个常规的选项是用数据库中默认的格式显示。