共用方式為


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

屬性值

控制的文字。

屬性

備註

對於繼承類別TextControl屬性Text的物件,這個屬性會呈現控制項的文字。 預設值為空白字串。

Text此屬性可透過屬性Text或內文來指定。 若 Text 性質同時指定,則內文始終優先。 然而,若 Text 該屬性是程式設定的,內層文本會自動移除,新設定的屬性優先。

適用於

另請參閱