A newer version of this page is available. Switch to the current version.

ASPxRichEdit.InsertContentToClient Event

Fires when the client RichEditCommands.insertContentFromServer command is executed.

Namespace: DevExpress.Web.ASPxRichEdit

Assembly: DevExpress.Web.ASPxRichEdit.v18.2.dll


public event InsertContentToClientEventHandler InsertContentToClient
Public Event InsertContentToClient As InsertContentToClientEventHandler

Event Data

The InsertContentToClient event's data class is InsertContentToClientEventArgs. The following properties provide information specific to this event:

Property Description
KeepLastParagraph Gets or sets whether the last paragraph of the inserted document is kept in the resulting document.
RequestId Gets the identifier of the request to the server.
Result Specifies the value passed to the client model.


Use the InsertContentToClient event's handler to create a server-side document's model and pass it to the client model. The model is passed to the client using the e.Result parameter as demonstrated in the code example below:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <script type="text/javascript">
        function onInsertTextClick() {
        function onInsertModelClick() {
    <form id="form1" runat="server">
            <dx:ASPxButton runat="server" ID="InsertText" Text="Insert Text">
                <ClientSideEvents Click="onInsertTextClick" />
            <dx:ASPxButton runat="server" ID="InsertModel" Text="Insert Model">
                <ClientSideEvents Click="onInsertModelClick" />
            <dx:ASPxRichEdit ID="ASPxRichEdit1" ClientInstanceName="richEdit" runat="server" WorkDirectory="~\App_Data\WorkDirectory" OnInsertContentToClient="ASPxRichEdit1_InsertContentToClient">

Note that the e.Result parameter should be represented by a string or the Document class's instance.

See Also