ASPxClientTextEdit.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 SetText method HTML encodes the specified text.

Example

The complete sample project is available in the DevExpress Code Central database: How to add buttons to a pop-up window .

<dx:ASPxTextBox ID="ASPxTextBox1" runat="server" Width="170px" ClientInstanceName="txtMain"
    ClientEnabled="False" Text="test message">
</dx:ASPxTextBox>
<dx:ASPxButton ID="ASPxButton1" runat="server" Text="Edit..." AutoPostBack="False">
    <ClientSideEvents Click="function(s, e) { txtPopup.SetText(txtMain.GetText()); popupControl.Show(); }" />
</dx:ASPxButton>
<dx:ASPxPopupControl ID="ASPxPopupControl1" runat="server" ClientInstanceName="popupControl"
    Height="83px" Modal="True" CloseAction="CloseButton" Width="207px" AllowDragging="True"
    PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter">
    <ContentCollection>
        <dx:PopupControlContentControl runat="server">
            Text:<dx:ASPxTextBox ID="ASPxTextBox2" runat="server" Width="170px" ClientInstanceName="txtPopup">
            </dx:ASPxTextBox>
            <br />
            <br />
            <table style="border: none">
                <tr>
                    <td>
                        <dx:ASPxButton ID="btnOK" runat="server" AutoPostBack="False" Text="OK" Width="80px"
                            OnClick="btnOK_Click">
                            <ClientSideEvents Click="function(s, e) { popupControl.Hide();
                                    // Processes data on the client
                                    e.processOnServer = true;
                                    // Processes data on the server
                                }" />
                        </dx:ASPxButton>
                    </td>
                    <td>
                        <dx:ASPxButton ID="btnCancel" runat="server" AutoPostBack="False" ClientInstanceName="btnCancel"
                            Text="Cancel" Width="80px">
                            <ClientSideEvents Click="function(s, e) { popupControl.Hide(); }" />
                        </dx:ASPxButton>
                    </td>
                </tr>
            </table>
        </dx:PopupControlContentControl>
    </ContentCollection>
</dx:ASPxPopupControl>
See Also