TableRow.TableSection 속성

정의

TableRow 컨트롤에 있는 Table 개체의 위치를 가져오거나 설정합니다.

public:
 virtual property System::Web::UI::WebControls::TableRowSection TableSection { System::Web::UI::WebControls::TableRowSection get(); void set(System::Web::UI::WebControls::TableRowSection value); };
public virtual System.Web.UI.WebControls.TableRowSection TableSection { get; set; }
member this.TableSection : System.Web.UI.WebControls.TableRowSection with get, set
Public Overridable Property TableSection As TableRowSection

속성 값

TableRowSection

TableRowSection 값입니다. 기본값은 TableBody입니다.

예외

TableRowSection이 올바르지 않은 경우

예제

다음 코드 예제를 사용 하는 방법에 설명 합니다 TableSection 속성에서 머리글 및 바닥글 행을 정의 하는 Table 컨트롤.

<%@ page language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>TableRow, TableFooter Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

    <h1>TableRow, TableFooter Example</h1>
    <asp:table id="Table1" runat="server" CellPadding="3" CellSpacing="0">
        <asp:TableRow TableSection="TableHeader" BackColor="Pink">
            <asp:TableCell Text="Header" ColumnSpan="3" />
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Text="(0,0)"></asp:TableCell>
            <asp:TableCell Text="(0,1)"></asp:TableCell>
            <asp:TableCell Text="(0,2)"></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Text="(1,0)"></asp:TableCell>
            <asp:TableCell Text="(1,1)"></asp:TableCell>
            <asp:TableCell Text="(1,2)"></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow TableSection="TableFooter" BackColor="Pink">
            <asp:TableCell Text="Footer" ColumnSpan="3" />
        </asp:TableRow>
    </asp:table>

    </div>
    </form>
  </body>
</html>
<%@ page language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>TableRow, TableFooter Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

    <h1>TableRow, TableFooter Example</h1>
    <asp:table id="Table1" runat="server" CellPadding="3" CellSpacing="0">
        <asp:TableRow TableSection="TableHeader" BackColor="Pink">
            <asp:TableCell Text="Header" ColumnSpan="3" />
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Text="(0,0)"></asp:TableCell>
            <asp:TableCell Text="(0,1)"></asp:TableCell>
            <asp:TableCell Text="(0,2)"></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Text="(1,0)"></asp:TableCell>
            <asp:TableCell Text="(1,1)"></asp:TableCell>
            <asp:TableCell Text="(1,2)"></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow TableSection="TableFooter" BackColor="Pink">
            <asp:TableCell Text="Footer" ColumnSpan="3" />
        </asp:TableRow>
    </asp:table>

    </div>
    </form>
  </body>
</html>

설명

사용 하 여는 TableSection 속성을 가져오거나 설정할 위치를 TableRow 개체에 배치 됩니다는 Table 컨트롤입니다. 사용 가능한 테이블 위치를 참조 하세요. TableRowSection합니다. 다음 표에서 가능한 값을 나열합니다.

테이블 행 섹션 로 표시
TableHeader 머리글 행입니다.
TableBody 테이블의 본문입니다.
TableFooter 바닥글 행입니다.

선언적 구문을 사용 하는 경우에 헤더, 본문 및 바닥글을 다음 순서 대로 섹션 이어야 합니다.

TableRowSection 열거형을 사용 하면 사용 하 여 액세스할 수 있는 웹 사이트를 빌드할 수 있습니다는 Table 추가 하 여 컨트롤을 <thead>, <tbody>, 및 <tfoot> 클라이언트에 렌더링 되는 html 요소입니다. 테이블의 모든 행이 있는 경우는 <tbody> 요소인 섹션 정보는 렌더링 되지 않습니다. 하나 이상의 행에 본문이 아닌 요소 여야 합니다.

이 속성의 값은 뷰 상태에 저장 됩니다.

적용 대상

추가 정보