Skip to main content

ASPxClientTextEdit.GetText Method

Returns the text displayed within the editor.


GetText(): string


Type Description

A string value representing the editor’s display text.


The GetText and the GetValue methods can return an incorrect (empty or previous) value in the client-side UserInput, KeyDown, KeyPress, and KeyUp event handlers when you apply a format, mask, or null text settings to a text editor.

In this case, obtain the editor’s text from the editor’s input element:

function OnUserInput(s, e) {  
    var currentText = s.GetInputElement().value;  

For more information refer to the following Support Center ticket: ticket.


<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:ASPxLabel ID="ASPxLabel1" runat="server" Text="" ClientInstanceName="label">

Online Example

See Also