Latest web development tutorials

ASP.NET TableCell ColumnSpan 屬性

TableCell 控件 TableCell控件

定義和用法

ColumnSpan 屬性用於設置或返回在Table 控件中TableCell 橫跨的列數。

語法

<asp:TableCell ColumnSpan="num" runat="server">
Some content
</asp:TableCell>
属性 描述
num 规定 TableCell 横跨的列数。


實例

下面的實例把ColumnSpan 屬性設置為"2":

<form runat="server">
<asp:Table id="tab1" runat="server">

<asp:TableRow>
<asp:TableCell ColumnSpan="2">
Some Content
</asp:TableCell>
</asp:TableRow>

<asp:TableRow>
<asp:TableCell>
Some Content
</asp:TableCell>
<asp:TableCell>
Some Content
</asp:TableCell>
</asp:TableRow>

</asp:Table>
</form>

演示實例»

TableCell 控件 TableCell控件