LiteralControl.Text 속성

정의

LiteralControl 개체의 텍스트 내용을 가져오거나 설정합니다.

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

속성 값

리터럴 컨트롤의 텍스트 내용을 나타내는 String입니다. 기본값은 Empty입니다.

구현

예제

다음 코드 예제에서는 클래스를 만듭니다 CustLiteralControlClass를 확장 하는 LiteralControl 클래스입니다. 이라는 클래스의 인스턴스를 만들고 myLiteralControlClass1 의 텍스트를 지정 하지 않는 생성자를 사용 하 여는 LiteralControl 개체입니다. 개체를 만든 후의 Text 속성은 포함 된 텍스트를 설정 하려면 사용 합니다.

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

적용 대상