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

ASPxClientLabel.SetText(text) Method

Sets the text to be displayed within the editor.

Declaration

SetText(
    text: string
): void

Parameters

Name Type Description
text string

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

Remarks

Note

  • The ASPxLabel control is intended for text representation only, so client-side text is not synchronized with the server.
  • The SetText method does not HTML encode the specified text.
<dx:ASPxTextBox ID="ASPxTextBox1" runat="server" Width="170px" ClientInstanceName="textBox"></dx:ASPxTextBox>
<dx:ASPxButton ID="ASPxButton1" runat="server" Text="Set Label Text" AutoPostBack="False" >
    <ClientSideEvents Click="function(s, e) {   label.SetText(textBox.GetText()); }" />
</dx:ASPxButton>
<dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="" ClientInstanceName="label">
</dx:ASPxLabel>
See Also