Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html asp偶尔将style=width:0px添加到gridview_Html_Css_Asp.net_Gridview - Fatal编程技术网

Html asp偶尔将style=width:0px添加到gridview

Html asp偶尔将style=width:0px添加到gridview,html,css,asp.net,gridview,Html,Css,Asp.net,Gridview,我的一些asp:GridView的布局有问题,因为在我使用的GridView中,几乎有一半的情况下,在element.style中添加了style=width:0px,我不知道它来自哪里 有人知道为什么这种情况只会偶尔发生吗?我如何避免这种情况 我可以在两个不同的页面上使用相同的网格,其中一个会得到,但另一个不会,这非常令人沮丧 我想这取决于浏览器……不,至少在FireFox、Chrome和Internet Explorer中都会发生,很确定它来自asp渲染时,但为什么它只发生在渲染表中的确切h

我的一些asp:GridView的布局有问题,因为在我使用的GridView中,几乎有一半的情况下,在element.style中添加了style=width:0px,我不知道它来自哪里

有人知道为什么这种情况只会偶尔发生吗?我如何避免这种情况

我可以在两个不同的页面上使用相同的网格,其中一个会得到,但另一个不会,这非常令人沮丧


我想这取决于浏览器……不,至少在FireFox、Chrome和Internet Explorer中都会发生,很确定它来自asp渲染时,但为什么它只发生在渲染表中的确切html标记上?th和td。请参阅编辑后的文章,我正在为代码隐藏中的边界字段创建一个通用类,用于设置HeaderStyle、ItemStyle和ControlStyle的宽度。