ASPxClientButton.SetText(value) Method

Sets the text to be displayed within the button.

Declaration

SetText(value: string): void

Parameters

Name Type Description
value string

A string value specifying the text to be displayed within the button.

Remarks

Note
  • If the ASPxButton.Text property is empty and a button image is specified, a text element markup is not rendered. In this case, it is impossible to set a text on the client side using the SetText method.
  • The SetText method does not HTML encode the specified text.

Examples

The complete sample project is available in the DevExpress Code Central database at E143.

function OnExpandCollapseButtonClick(s, e) {
    var isVisible = ContentPanel.GetClientVisible();
    s.SetText(isVisible ? "+" : "-");
    ContentPanel.SetClientVisible(!isVisible);
}
See Also