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

推荐订阅源

V
Vulnerabilities – Threatpost
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
D
DataBreaches.Net
博客园_首页
罗磊的独立博客
B
Blog
T
Threat Research - Cisco Blogs
C
Cisco Blogs
GbyAI
GbyAI
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
G
GRAHAM CLULEY
H
Help Net Security
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
爱范儿
爱范儿
SecWiki News
SecWiki News
T
Threatpost
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Schneier on Security
Schneier on Security
T
The Exploit Database - CXSecurity.com
Google Online Security Blog
Google Online Security Blog
T
Tor Project blog
小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Y
Y Combinator Blog
H
Hacker News: Front Page
V
V2EX
Security Latest
Security Latest
Cloudbric
Cloudbric
Simon Willison's Weblog
Simon Willison's Weblog
Attack and Defense Labs
Attack and Defense Labs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed
博客园 - 三生石上(FineUI控件)
NISL@THU
NISL@THU
S
Secure Thoughts
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
V2EX - 技术
V2EX - 技术
Vercel News
Vercel News
P
Palo Alto Networks Blog
IT之家
IT之家
MyScale Blog
MyScale Blog
有赞技术团队
有赞技术团队
Application and Cybersecurity Blog
Application and Cybersecurity Blog
D
Docker
Google DeepMind News
Google DeepMind News
Webroot Blog
Webroot Blog

博客园 - 赣江源

StreamInsight参考示例 Microsoft StreamInsight简介 GridView中的DataFormatString失效解决办法 - 赣江源 - 博客园 按照时间点还原数据库(SQL Server) 如何显示在线用户? ASP.NET中每个页面在Load之前调用公用函数 网站单点登录的实现思路 在服务器端提取ASP.NET控件输出的HTML 如何处理在IE7关闭时不出现选项卡提示 使用JavaScript控制UpdatePanel的更新 获取GridView单元格值的通用函数 如何在GridView将数字显示成金额格式或自定义格式? ASP.NET 2.0中使用XSLT的变化 在GridView表头显示排序方向 利用AJAX实现DropDownList与GridView做实时更新 ASP.NET实现打印的方法小结 提高ASP.NET性能的一点方法 asp.net的一些小技巧 route命令详解
输出时清除GridView的Style
赣江源 · 2007-11-06 · via 博客园 - 赣江源

在aspx页面中将GridView控件拖入后,如果不做任何的设置情况下,页面文件*.aspx的代码如下:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="EmployeeID" DataSourceID="SqlDataSource1" EmptyDataText="无显示的记录">  在这种情况下运行程序后输出的HTML代码却会包含style="border-collapse:collapse;",如下所示:
<table cellspacing="0" rules="all" border="1" id="GridView1" style="border-collapse:collapse;">  

但是如果你需要将 GridView 输出 HTML 代码时不包含 Style,可以增加以下的设置即可,同样也适合于输出GridView到文件。
GridView1.GridLines = GridLines.None  
GridView1.CellSpacing=-1