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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 赣江源

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