ASP.NET Text Property

Definition and Usage

The Text property is used to set or return the text on the button control.

Syntax

<asp:Button Text="string" runat="server" />
Property Description
string A string value that specifies the text on the button control.

Example

The following example sets the text on the Button control:

<form runat="server">
<asp:Button id="button1" runat="server"> Text="Submit" />
</form>

Example

Set Text for Button Control