ASP.NET BorderStyle Property


Style Control Reference Complete Style Control Reference

Definition and Usage

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

Syntax

<asp:webcontrol id="id" BorderStyle="style" runat="server" />

Possible Style Values

Value Description
NotSet Border style is not set
None Defines no border
Dotted Defines a dotted border
Dashed Defines a dashed border
Solid Defines a solid border
Double Defines two borders. The width of the two borders are the same as the border-width value
Groove Defines a 3D grooved border. The effect depends on the border-color value
Ridge Defines a 3D ridged border. The effect depends on the border-color value
Inset Defines a 3D inset border. The effect depends on the border-color value
Outset Defines a 3D outset border. The effect depends on the border-color value


Example

The following example sets the border style of a 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>

Show example »

Try-It-Yourself Demos

Set the border color of a Button control (with declaration and script)


Style Control Reference Complete Style Control Reference

Color Picker

colorpicker