Back to Devexpress

ASPxHtmlEditor.Validation Event

aspnet-devexpress-dot-web-dot-aspxhtmleditor-dot-aspxhtmleditor-91a44c39.md

latest2.6 KB
Original Source

ASPxHtmlEditor.Validation Event

Allows you to specify whether the ASPxHtmlEditor’s content is valid.

Namespace : DevExpress.Web.ASPxHtmlEditor

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

NuGet Package : DevExpress.Web

Declaration

csharp
public event EventHandler<HtmlEditorValidationEventArgs> Validation
vb
Public Event Validation As EventHandler(Of HtmlEditorValidationEventArgs)

Event Data

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

PropertyDescription
ErrorTextGets or sets the error description.
HtmlGets or sets the HTML markup specifying the ASPxHtmlEditor’s content.
IsValidGets a value specifying whether the validation has been completed successfully.

Remarks

The Validation event is raised when it is required to validate the ASPxHtmlEditor’s value.

Handle the Validation event to test the ASPxHtmlEditor’s content against custom validation criteria. If the content, obtained via the HtmlEditorValidationEventArgs.Html property, doesn’t meet your restrictions, you can provide text explaining why the validation has failed, by assigning a descriptive text to the HtmlEditorValidationEventArgs.ErrorText property and by setting the event parameter’s HtmlEditorValidationEventArgs.IsValid property to false. In this case, the specified text will be displayed within a specific message box.

See Also

HTML Editor

ASPxHtmlEditor Class

ASPxHtmlEditor Members

DevExpress.Web.ASPxHtmlEditor Namespace