ASP.NET Font Property
Definition and Usage
The Font property is used to set or return the font of the control.
Syntax
<asp:webcontrol id="id" font-subproperty="value" runat="server" />
| Value | Description |
|---|---|
| Bold | Bold Subproperty. Possible values are TRUE or FALSE. |
| Italic | Italic Subproperty. Possible values are TRUE or FALSE. |
| Name | Font Name Property. (e.g., "Verdana" or "Arial") |
| Names | An array of font names. The Name property is automatically updated through the first element of the array. |
| Strikeout | Strikeout Subproperty. Possible values are TRUE or FALSE. |
| Underline | Underline Subproperty. Possible values are TRUE or FALSE. |
| Size | Font Size Subproperty. Specifies the font size. |
Example
This example sets the font of the button control:
<form runat="server"> <asp:Button id="Button1" Text="Submit" Font-Name="Verdana" Font-Size="15" runat="server"/> </form>
Example
- Set the font of the button control

