ASP.NET BorderStyle Attribute

Definition and Usage

The BorderStyle property is used to set or return the border style of the control.

Syntax

<asp:webcontrol id=""id" BorderStyle=""style" runat="server" />
Value Description
notSet Do not set the border style.
none Define a border without any lines.
dotted Define a dotted line border.
dashed Define a dashed line border.
solid Define a solid line border.
double Define a double-line border. The width of the double line is equal to the value of border-width.
groove Define a 3D grooved border. Its effect depends on the value of border-color.
ridge Define a 3D embossed border. Its effect depends on the value of border-color.
inset Define a 3D inset border. Its effect depends on the value of border-color.
outset Define a 3D outset border. Its effect depends on the value of border-color.

Example

This example sets the border style of the table:

<form runat="server">
<asp:Table runat="server" BorderStyle="dotted" 
BorderWidth="5" GridLines="vertical">
  <asp:TableRow>
    <asp:TableCell>Hello</asp:TableCell>
    <asp:TableCell>World</asp:TableCell>
  </asp:TableRow>
</asp:Table>
</form>

Example

Set the BorderStyle of the Table Control