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"

適用対象