gpt4 book ai didi

Asp.Net GridView 删除 Html 样式

转载 作者:行者123 更新时间:2023-12-02 14:02:38 25 4
gpt4 key购买 nike

当我在 Asp.Net 中使用 GridView 时,它会自动生成这个丑陋的 Html 样式:cellspacing="0"rules="all"border="1"style=“边框折叠:折叠;

有没有办法完全不使用这种样式?

更新

目前我得到的是:

<table cellspacing="0" rules="all" border="1" id="ctl00_cphMain_gvTest" style="border-collapse:collapse;">

我想要什么:

<table id="ctl00_cphMain_gvTest">

所以,根本没有 Html 样式。我想要干净的 Html,如果我想添加样式,我会使用 CSS...

最佳答案

看看CSS friendly ASP.NET 2.0 Control Adapaters在 ASP.NET 网站上。

它不仅去掉了大部分丑陋的属性,还添加了 theadtbody 标签。

关于Asp.Net GridView 删除 Html 样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1309667/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com