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" />
Possible style values
Value | Description |
---|---|
NotSet | Border style not set. |
None | Define no border. |
Dotted | Define dotted line border. |
Dashed | Define dashed line border. |
Solid | Define solid line border. |
Double | Define double solid line border. The width of the two borders is the same as the border-width value. |
Groove | Define 3D grooved border. This effect depends on the border-color value. |
Ridge | Define 3D raised border. This effect depends on the border-color value. |
Inset | Define 3D inset border. This effect depends on the border-color value. |
Outset | Define 3D outset border. This effect depends on the border-color value. |
Example
The following 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 Table Control
- Set the BorderStyle of Table Control (with declaration and script)