Atrybut TableSection ASP.NET

Definicja i użycie

Atrybut TableSection służy do ustawiania lub zwracania pozycji obiektu TableRow w Table Kontrolce.

Użyj atrybutu TableSection, aby uzyskać lub ustawić pozycję obiektu TableRow w Table Kontrolce.

Gramatyka

<asp:TableRow TableSection="section" runat="server">
Some Content
</asp:TableRow>
Atrybut Opis
section

Definiuje, do której części tabeli należy ten wiersz.

Możliwe wartości:

  • TableHeader - wiersz nagłówka tabeli
  • TableBody - domyślny. Treść tabeli
  • TableFooter - wiersz podkładki

Przykład

Poniższy przykład ustawia atrybut TableSection dla TableRow Kontrolki:

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

Przykład

Definiuje TableSection dla TableRow Kontrolki