ASP.NET BorderWidth Property

Definition and Usage

The BorderWidth property is used to set or return the border width of the control.

Syntax

<asp:webcontrol id="id" BorderWidth="length" runat="server" />
Value Description
length Border width. It must be a valid .NET length unit. Valid length units are cm, mm, in, pt, pc, or px.

Example

This example sets the table border width:

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

Example

Set the BorderWidth of the Table Control