Skip to main content

ASPxRichEdit.ClientInstanceName Property

Specifies the ASPxRichEdit‘s client programmatic identifier.

Namespace: DevExpress.Web.ASPxRichEdit

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

NuGet Package: DevExpress.Web.Office


public string ClientInstanceName { get; set; }

Property Value

Type Default Description
String String.Empty

The control’s client identifier.


Use the ClientInstanceName property to specify a unique client-side identifier for the ASPxRichEdit control. Use this identifier on the client side to access the ASPxClientRichEdit object programmatically.


<script type="text/javascript">
    function getAllText() {
        return RichEdit.document.activeSubDocument.text;
    function getSelectedText() {
        var firstSelectedInterval = RichEdit.selection.intervals[0];
        var selectedText = RichEdit.document.activeSubDocument.text.substr(firstSelectedInterval.start, firstSelectedInterval.length);
        return selectedText;
<dx:ASPxButton runat="server" ID="Button1" Text="Get All Text" AutoPostBack="false">
    <ClientSideEvents Click="function(s, e) { alert(getAllText()); }" />
<dx:ASPxButton runat="server" ID="Button2" Text="Get Selected Text" AutoPostBack="false">
    <ClientSideEvents Click="function(s, e) { alert(getSelectedText()); }" />

<dx:ASPxRichEdit ID="RichEdit" runat="server" ClientInstanceName="RichEdit">

The ClientInstanceName property is important when a control is contained within a naming container, for instance, within an ASPxPageControl‘s page or an ASPxPopupControl‘s window.

If the ClientInstanceName property is not specified for a control, the control’s client identifier is generated automatically and equals the value of the control’s ID property. Note that in this case, client-side programmatic access to the control is not allowed when the control is contained within a naming container.

See Also