ASP.NET TableSection 屬性

定義和用法

TableSection 屬性用於設置或返回 Table 控件中的 TableRow 對象的位置。

使用 TableSection 屬性來獲取或設置在 Table 控件中放置 TableRow 對象的位置。

語法

<asp:TableRow TableSection="section" runat="server">
Some Content
</asp:TableRow>
屬性 描述
section

規定該行屬於的表格部分。

可能的值:

  • TableHeader - 表頭行
  • TableBody - 默认。表的正文
  • TableFooter - 脚注行

實例

下面的例子设置了 TableRow 控件的 TableSection 属性:

<form runat="server">
<asp:table id="Table1" runat="server" GridLines="Both">
<asp:TableRow TableSection="TableHeader">
<asp:TableCell>標題</asp:TableCell>
</asp:TableRow>
</asp:table>
</form>

實例

規定 TableRow 控件的 TableSection