ASP.NET GridLines property

Definition and usage

The GridLines property is used to set or return the grid line style of the Table control.

Note:This property is invalid in FireFox.

Syntax

<asp:Table GridLines="mode" runat="server">
Some Content
</asp:Table>
Property Description
mode

Specify the grid line style for the table.

Possible values:

  • None
  • Horizontal
  • Vertical
  • Both

Example

The following example sets the GridLines property to "Vertical":

<form runat="server">
<asp:Table id="tab1" runat="server" GridLines="Vertical">
<asp:TableRow>
<asp:TableCell>
Hello!
</asp:TableCell>
<asp:TableCell>
Hello!
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</form>

Example

Set GridLines style for Table control