System.Web.UI.WebControls Namespace Style Class
Sets or retrieves the border width of a Web control.
Inline |
<asp:control BorderWidth = intUnit ... > |
Script |
Style.BorderWidth [ = intUnit ] |
intUnit |
Floating-point number and a valid .NET length Unit: either an absolute units designator ( cm, mm, in, pt, pc, or px ) or a relative units designator ( em or ex ). |
This property is read/write with no default value.
BorderWidth is used to specify how wide the border of a Web server control is rendered. This property is set with a Unit object that must evaluate to a positive value.
Note that this property will render only for certain controls.
In general, only controls that render as an HTML <table> or <div> element ( block objects ) can display a border color, such as Table, Panel, DataGrid, Calendar, etc.
It will also work for list controls that have their RepeatLayout property set to Table, such as the CheckBoxList, RadioButtonList and DataList.
NOTE: All unit types are supported as of Microsoft® Internet Explorer® 5 and later. BorderWidth can only be expressed in pixels, though, for browsers earlier than version 5.
Style Members Base Web Control Properties