Button::Text Property

 

Gets or sets the text caption displayed in the Button control.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public:
[BindableAttribute(true)]
property String^ Text {
	virtual String^ get() sealed;
	virtual void set(String^ value) sealed;
}

Property Value

Type: System::String^

The text caption displayed in the Button control. The default value is String::Empty.

Use the Text property to specify or determine the caption to display in the Button control.

The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see LocalizableAttribute and ASP.NET Globalization and Localization.

The following code example demonstrates how to use the Text property to specify the caption displayed in the Button control.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: