Skip to main content

ASPxHtmlEditor.HtmlCorrecting Event

Occurs before the ASPxHtmlEditor‘s HTML markup is automatically corrected based upon the HTML validation parameters specified.

Namespace: DevExpress.Web.ASPxHtmlEditor

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

NuGet Package: DevExpress.Web


public event EventHandler<HtmlCorrectingEventArgs> HtmlCorrecting

Event Data

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

Property Description
Handled Gets or sets whether an HTML markup correcting operation is handled manually, so no default processing is required.
Html Gets or sets the HTML markup representing the HtmlCorrectingEventArgs‘s content.


The HtmlCorrecting event allows you to perform any custom check or transformation of the editor’s HTML code before it is validated automatically based upon the specified HTML validation parameters. Automatic HTML validation is performed via an internal call to the ASPxHtmlEditor.CorrectHtml method.

You can avoid automatic HTML code validation by setting the HtmlCorrectingEventArgs.Handled property to true in an event handler.


A browser automatically validates any HTML markup that is assigned to the innerHTML property. To learn more, see the ASPxHtmlEditor HTML correction online Knowledge Base article.


The ASPxHtmlEditor.Html property value is empty in the HtmlCorrecting event handler. Because the ASPxHtmlEditor.Html property is set to the HtmlCorrectingEventArgs.Html event argument value after the HtmlCorrecting event has processed the HTML code (on a page load).

<dx:ASPxHtmlEditor ID="ASPxHtmlEditor1" OnHtmlCorrecting="ASPxHtmlEditor1_HtmlCorrecting" runat="server">
See Also