aspnet-js-aspxclientbutton-dot-settext-x28-value-x29.md
Sets the text to be displayed within the button.
SetText(
value: string
): void
| Name | Type | Description |
|---|---|---|
| value | string |
A string value specifying the text to be displayed within the button.
|
Note
Refer to the following demo for a full example: Button - Features.
<script>
function onCheckedChanged(s, e) {
if (s.GetChecked()) {
button.SetEnabled(false);
s.SetText("Enable Button");
} else {
button.SetEnabled(true);
s.SetText("Disable Button");
}
}
</script>
<dx:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" GroupName="G" Text="Disable Button">
<ClientSideEvents CheckedChanged="onCheckedChanged" />
</dx:ASPxButton>
<dx:ASPxButton ID="ASPxButton2" runat="server" AutoPostBack="False" ClientInstanceName="button" Text="Button">
</dx:ASPxButton>
See Also