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" />
Property Description
length Border width. It must be a valid .NET length unit. Valid units are: cm, mm, in, pt, pc, or px.

Example

The following example sets the border width of the table.

<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
Set the BorderWidth of the Table Control (with declaration and script)