Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Show All Themes


  • v
  • v
  • Bold (Ctrl+B)
  • Italic (Ctrl+I)
  • Underline
  • Strikethrough
  • Align Left (Ctrl+L)
  • Align Center (Ctrl+E)
  • Align Right (Ctrl+R)
  • Justify (Ctrl+J)

The current length of HTML code representing the editor's content (in characters): 221
Built-in Validation
Custom Validation

The ASPxHtmlEditor provides a built-in means to perform powerful validation of its content, both on the client and server. Different validation settings are available for customization through the editor's SettingsValidation property.

To define editor validation logic, the following easy-to-use methods are provided (which can be combined together, if required):

  • The SettingsValidation.RequiredField property can be used to force an editor to require input, and give you the ability to display an error message if input is not received.
  • The editor's Validation event (client or server, or both) can be handled to setup custom editor validation. Review the code sample tabs within this demo, to learn how easy this really is.

Client validation of the ASPxHtmlEditor can be triggered automatically via a click on an ASPxButton, whose CausesValidation property is set to true. You can also manually initiate the editor's client validation by using the editor's Validate client method or specific static client methods (such as the ASPxClientEdit.ValidateEditorsInContainer, ASPxClientEdit.ValidateEditorsInContainerById, ASPxClientEdit.ValidateGroup).

The editor's server validation is always performed during processing of an external postback, if the editor's content has been changed. The server validation can also be initiated programmatically by using the editor's Validate server method, or a specific static server method ASPxEdit.ValidateEditorsInContainer.

Additionally, you are allowed to validate the editor's content programmatically (when required), and indicate the validation result manually, by either setting the editor's IsValid server property or using the SetIsValid client method.

When an editor fails validation logic, a specific error frame containing the error description can be displayed within the editor's View. The error frame's appearance is customized via the SettingsValidation.ErrorFrameStyle property. The error text can be specified by using the SettingsValidation.ErrorText property, in the Validation event's handler, or via the editor's ErrorText property (depending upon the validation method used).

This demo illustrates the built-in flexibility and efficiency of our validation engine, allowing you to easily implement different validation scenarios.

Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxHTMLEditorDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxHTMLEditorDemos