Share via


TEXT Attribute | Text Property

Sets or retrieves a value that indicates the text or caption for the object.

Syntax

ASP <tagPrefix:ELEMENT TEXT = sText ... >
Script [ sText = ] object.Text

Possible Values

tagPrefix Required. The element prefix associated with the WebControls namespace (Microsoft.Web.UI.WebControls). A TagPrefix is defined using the directive.
sText System.String that specifies or receives the text or caption for the object.

The property is read/write. The property has no default value.

Remarks

The value of this property overrides any text between the opening and closing element tags.

When this property is set on TreeNode, you can supply text marked up with HTML. For example, you can make text bold by setting the property to a string like this — "<B>My Node Text</B>", which renders as My Node Text.

Applies To

TabItem, TAB, TABSEPARATOR, TOOLBARLABEL

See Also

Internet Explorer WebControls, About the TabStrip WebControl, About the Toolbar WebControl, About the TreeView WebControl