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

推荐订阅源

Forbes - Security
Forbes - Security
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
Y
Y Combinator Blog
Recorded Future
Recorded Future
博客园 - Franky
I
InfoQ
T
The Blog of Author Tim Ferriss
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
雷峰网
雷峰网
P
Palo Alto Networks Blog
G
GRAHAM CLULEY
Cloudbric
Cloudbric
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
F
Full Disclosure
Google DeepMind News
Google DeepMind News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Check Point Blog
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
T
Threat Research - Cisco Blogs
U
Unit 42
N
Netflix TechBlog - Medium
The Cloudflare Blog
Spread Privacy
Spread Privacy
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队
T
Troy Hunt's Blog
Engineering at Meta
Engineering at Meta
H
Heimdal Security Blog
TaoSecurity Blog
TaoSecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tenable Blog
B
Blog
S
Securelist
H
Hacker News: Front Page
Google Online Security Blog
Google Online Security Blog
G
Google Developers Blog

博客园 - DongD

今天在ASP.NET上在写一个读取EXCEL文件内容的功能,但是IE8貌似把文件路径给屏蔽了,在IE6下面读取正常!有啥好办法? 刚看了一点Spring .NET, 从第一个例子MovieFinder说起(2) 刚看了一点Spring .NET, 从第一个例子MovieFinder说起 RegularExpressionValidator控件中正则表达式用法[转] 一个计算周次和本周时间范围的代码(c#) ASP.NET 安全认证(二)【转】 ASP.NET 的安全认证 - DongD - 博客园 Host and Workflow: Two Worlds to Communicate: Part III Host and Workflow: Two Worlds to Communicate - Part II Host and Workflow: Two Worlds to Communicate: Part I .NET2.0正则表达式【转】 解决Active Directory密码不满足密码策略的要求 Gridview控件中字符串的截取【转】 asp.net(c#)常用正则表达式实例 C#中的delegate和event 【转】 Asp.net &C#开发中的一些注意事项及小技巧【转】 C# 事件机制【转】 asp.net中为TextBox Web服务器控件添加OnClick事件【转】 跳楼有感【转载】
gridview在绑定显示的各种格式
DongD · 2009-09-10 · via 博客园 - DongD

gridview列 数字、货币和日期 显示格式
形式 语法 结果 注释
数字 {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等数据绑定控件的模版列时,总要设置显示的格式,这里是我查询一些资料后统计出来的。
还有一个常规的选项是用数据库中默认的格式显示。

以下是一个例子
 <asp:Label ID="Label2" runat="server" Text='<%# Eval("dtt","{0:d}") %>'></asp:Label>

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/sendling/archive/2006/12/21/1452186.aspx