Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/15.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
如何防止ASP.NET添加到内联样式?_Asp.net_Vb.net_Coding Style_Asp.net 2.0 - Fatal编程技术网

如何防止ASP.NET添加到内联样式?

如何防止ASP.NET添加到内联样式?,asp.net,vb.net,coding-style,asp.net-2.0,Asp.net,Vb.net,Coding Style,Asp.net 2.0,我有一个我正在尝试设计的元素: <tr runat="server" id="row" > ... </tr> 我得到这个输出: <tr id="SearchResults_myRepeaterPlain_ctl04_row" style="background: rgb(204, 204, 204) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: pa

我有一个我正在尝试设计的元素:

<tr runat="server" id="row" >
...
</tr>
我得到这个输出:

<tr id="SearchResults_myRepeaterPlain_ctl04_row" style="background: rgb(204, 204, 204) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">


这些额外的样式信息是从哪里来的?我怎么才能阻止它呢?

我的直觉是因为你只使用背景。它正在为背景添加所有其他值。尝试使用背景色:

我的直觉是,您只使用背景色。它正在为背景添加所有其他值。尝试使用背景色:

+1,请参阅CSS背景属性的文档:。切换到背景色实际上解决了问题。+1,请参阅CSS背景属性的文档:。切换到背景色实际上解决了问题。
<tr id="SearchResults_myRepeaterPlain_ctl04_row" style="background: rgb(204, 204, 204) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">