Blogs

News

Email Subscriptions

Mehul Harry's DevExpress Blog

ASP.NET HTML Editor Validation (coming soon in v2010 vol 2)

     

Check out the ASP.NET HTML editor’s powerful built-in validation feature coming soon in the DXperience v2010 volume 2 release:

AspNet_HTML_Editor_Validation

Flexible Validation

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

Easy-To-Use Methods

Easy-to-use methods are provided to define editor validation logic. These methods can be combined together for extensive validation:

  • 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 an input is not received
  • The editor's Validation event (client or server, or both) can be handled to setup custom editor validation

Client-side Validation

The ASP.NET HTML Editor will feature Client-side input validation. You can manually initiate the editor's client validation by using the editor's Validate client method. Or specific static client methods are also available such as the:

  • ASPxClientEdit.ValidateEditorsInContainer
  • ASPxClientEdit.ValidateEditorsInContainerById
  • ASPxClientEdit.ValidateGroup

Server-side Validation

The ASP.NET HTML editor will also feature server-side input validation. The editor's server validation will always be 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.

You are also 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.

Custom Error Text and Display

When an editor fails validation logic, a specific error frame containing the error description can be displayed within the editor's Design, Preview and HTML View. The error frame's appearance is customized through the SettingsValidation.ErrorFrameStyle property.

This 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).

Coming soon in v2010 volume 2

The new ASP.NET HTML Editor’s Validation feature will be part of the upcoming DXperience v2010 volume 2 release soon.

 

Are you excited about all the new and exciting feature enhancements that the ASP.NET HTML Editor is bringing you? Drop me a line below with your thoughts on the powerful new validation feature. Thanks!

Want to experience a better Visual Studio?

Install CodeRush by downloading the free lite version here: CodeRush Xpress

Or better yet, try the full blown package free for 30 days – CodeRush and Refactor Pro Download!

Published Oct 04 2010, 11:05 AM by Mehul Harry (DevExpress)
Bookmark and Share

Comments

 

Henrik Brinch said:

Nice indeed!!!

But I'm looking much more forward to features such as:

- Insert image upload from local computer with image preview.

- Sizing of the editor is a nightmare, but I gather this has will be improved in the upcomming release (maybe you will even throw in a full-screen button?)

October 4, 2010 2:45 PM
 

Mehul Harry (DevExpress) said:

Henrik,

Thanks!

Sizing is going to be in the next release Smile

community.devexpress.com/.../asp-net-html-editor-resizing-coming-in-v2010-vol-2.aspx

Insert image upload from local computer is already in the ASPxHtmlEditor now:

demos.devexpress.com/.../General.aspx

The image preview is not there for the local computer because you can already preview the image locally in the dialog. :)

Hope that helps.

October 4, 2010 3:33 PM
 

Henrik Brinch said:

Great!

I guess I ment choose already uploaded image (server folder) with image preview :)  This is really a current limitation, that I hope to receive before 2011-vol X :)

October 5, 2010 11:35 AM
 

Mehul Harry (DevExpress) said:

Henrik,

Keep an eye on my blog about this feature next week Wink

Till then, check out this codecentral sample which can help you:

codecentral.devexpress.com/E946

Thanks.

October 5, 2010 1:49 PM

About Mehul Harry (DevExpress)

Mehul Harry is an ASP.NET technical evangelist at Developer Express. You can reach him directly at mharry@DevExpress.com. You can also follow him on Twitter: http://twitter.com/mehulharry
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.