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 を指定