ערוך

שתף באמצעות


LiteralControl.Text Property

Definition

Gets or sets the text content of the LiteralControl object.

public:
 virtual property System::String ^ Text { System::String ^ get(); void set(System::String ^ value); };
public virtual string Text { get; set; }
member this.Text : string with get, set
Public Overridable Property Text As String

Property Value

A String that represents the text content of the literal control. The default is Empty.

Implements

Examples

The following code example creates a class, CustLiteralControlClass, that extends the LiteralControl class. It creates an instance of the class named myLiteralControlClass1 by using the constructor that does not specify the text of the LiteralControl object. After the object is created, the Text property is used to set the text that it contains.

CustomLiteralControlClass myLiteralControlClass1= 
               new CustomLiteralControlClass();
myLiteralControlClass1.Text="This Control demonstrates the constructor1";
Dim myLiteralControlClass1 as CustomLiteralControlClass = _
new CustomLiteralControlClass()
myLiteralControlClass1.Text="This Control demonstrates the constructor1"

Applies to