TextControl.Text 屬性

定義

設定或傳回控制項的文字。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

public:
 property System::String ^ Text { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Bindable(true)]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.EncodedInnerDefaultProperty)]
public string Text { get; set; }
[<System.ComponentModel.Bindable(true)>]
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.EncodedInnerDefaultProperty)>]
member this.Text : string with get, set
Public Property Text As String

屬性值

控制項的文字。

屬性

備註

對於繼承 Text 類別屬性 TextControl 的對象,這個屬性會轉譯控件的文字。 預設值為空字串。

您可以使用 Text 屬性或內部文字來指定 Text 屬性。 Text如果以兩種方式指定 屬性,內部文字一律會優先使用。 不過,如果 Text 以程式設計方式設定屬性,則會自動移除內部文字,而且新設定的屬性優先。

適用於

另請參閱