ASP.NET BorderStyle 屬性
Web 控件標準屬性參考手冊
定義和用法
BorderStyle 屬性用於設置或返回控件的邊框樣式。
語法
<asp:webcontrol id="id" BorderStyle="style" runat="server" />
Possible Style Values
| 值 | 描述 |
|---|---|
| notSet | 不設置邊框樣式。 |
| none | 定義無邊框。 |
| dotted | 定義點狀邊框。 |
| dashed | 定義虛線邊框。 |
| solid | 定義實線邊框。 |
| double | 定義雙實線邊框。雙線的寬度等於 border-width 的值。 |
| groove | 定義 3D 凹槽邊框。其效果取決於 border-color 的值。 |
| ridge | 定義 3D 壟狀邊框。其效果取決於 border-color 的值。 |
| inset | 定義 3D 內嵌邊框。其效果取決於 border-color 的值。 |
| outset | 定義 3D 外嵌邊框。其效果取決於 border-color 的值。 |
實例
下麵的實例設置表格的邊框樣式:
<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>
<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>
Web 控件標準屬性參考手冊
