Back to Devexpress

Bind HTML Editor to Data

aspnet-7516-components-html-editor-concepts-get-and-set-html-data-binding.md

latest878 B
Original Source

Bind HTML Editor to Data

  • Oct 06, 2023

You can use the ASPxHtmlEditor.Html property to bind ASPxHtmlEditor content to datasource fields. This technique is useful if you integrate the editor into the ASPxGridView or asp:Repeater.

aspx
<dx:ASPxGridView ID="ASPxGridView1" runat="server">
     <Templates>
          <EditForm>
              <dx:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server" 
                  Html='<%# Eval("DescriptionHtml") %>'>
              </dx:ASPxHtmlEditor>
               ...
           </EditForm>
    </Templates>
</dx:ASPxGridView>