System.Web.UI.WebControls.WebControl.Font Property

Gets the font properties associated with the Web server control.

Syntax

[System.ComponentModel.NotifyParentProperty(true)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
public virtual FontInfo Font { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the WebControl.Font property to specify the font properties of the Web Server control. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example Font-Bold) or programmatically in the form of Property.Subproperty (for example Font.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: FontInfo.Bold, FontInfo.Italic, FontInfo.Name, FontInfo.Names, FontInfo.Strikeout, FontInfo.Underline, and FontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note:

Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is FontInfo.Overline.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0