Skip to main content
A newer version of this page is available. .

ASPxClientButton Class

A client-side equivalent of the ASPxButton control.

Declaration

declare class ASPxClientButton extends ASPxClientControl

Remarks

The ASPxClientButton object serves as a client-side equivalent of the ASPxButton control.

ASPxButton_control.png

Use the ClientInstanceName property to programmatically access the client object rendered for the ASPxButton control in client-side script.

Note

The button’s client-side API is enabled if the EnableClientSideAPI property is set to true, or the ClientInstanceName property is defined, or any client event is handled.

Example

For a full example, see Button - Features demo.

<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