table设置了各列的宽度。如果加上了 runat="server",则在生成的html里,没有colgroup一节。
<table class="mytable" runat="server" id="Table1" cellpadding="0" cellspacing="0">
<colgroup>
<col width="15%" align="center" />
<col width="10%" />
<col width="15%" />
<col width="10%" />
<col width="15%" />
<col width="10%" />
</colgroup>
MSDN的原话就是
"A complex table model is not supported. You cannot have an HtmlTable control with nested caption, col, colgroup, tbody, thead, or tfoot elements."
浙公网安备 33010602011771号