Share via


Text Property (TextControl)

Sets or returns the text for the control.

public string Text {
   get,
   set
}

Inheritance

The following is a list of the classes that inherit the Text property from the TextControl base class.

BaseValidator Class Link Class
PhoneCall Class RangeValidator Class
Command Class RegularExpressionValidator Class
CompareValidator Class RequiredFieldValidator Class
CustomValidator Class TextBox Class
Label Class TextView Class

Remarks

For an object that inherits the Text property from the TextControl class, this property renders the text of the control. The default value is an empty string.

The Text property can be specified by using the Text attribute, or as inner text. If the Text property is specified in both ways, the inner text always takes precedence. However, if the Text property is programmatically set, the inner text is automatically removed and the newly set property takes precedence.

See Also

Applies to: TextControl Class