ASP.NET Captcha Control Sneak Peek

23 February 2010

ASPxCaptcha In the first major DXperience release of 2010, we’re introducing a new ASP.NET Captcha control called the ASPxCaptcha.

What is a Captcha?

A CAPTCHA or Captcha (pronounced /ˈkæptʃə/) is a type of challenge-response test used in computing to ensure that the response is not generated by a computer. The process usually involves one computer (a server) asking a user to complete a simple test which the computer is able to generate and grade. …[Wikipedia]

Captcha Control Overview

The ASPxCaptcha will be part of the ASPxEditors Suite which is included with the ASPxGridView & Editors Library. When designing the ASPxCaptcha, our ASP.NET team set two key goals:

  1. Make this control as flexible in configuration and customization capabilities as all our other DevExpress ASP.NET controls.
  2. Create a truly working and quality Captcha which is difficult for machine recognition but easy enough for the user (humans).

And the team has succeeded! The ASPxCaptcha is a fully self-contained control which doesn’t require you to write a bunch of extra code to use it. In fact, the only code you’ll need to handle is what the next action will be if the user passes verification.

Of course, it wouldn’t be a DevExpress control if you couldn’t customize it.

Appearance and Customization

 ASPxCaptcha elementsThe ASPxCaptcha is made of 3 key functional sub-elements:

  1. ChallengeImage – An image displayed to the user
  2. RefreshButton – A button to change the image and generate a new code (in case it’s too difficult for the user)
  3. TextBox – To enter the code displayed in the ChallengeImage

Check out the image on the right to see the 3 key functional sub-elements.

All three elements can be positioned differently, relative to each other:

ASPxCaptcha - repositioned elements ASPxCaptcha - repositioned elements

The RefreshButton and TextBox elements are optional and can be easily disabled:

ASPxCaptcha - No Refresh Button ASPxCaptcha - Challenge Image Only

Each functional element has a wide range of properties for customization:

ASPxCaptcha - ChallengeImage Properties ASPxCaptcha - RefreshButton and Textbox Properties

You can even create a Google-like Captcha:

Google Captcha ASPxCaptcha - Google Style
Google ASPxCaptcha

The only difference between these two is that the ASPxCaptcha looks better. :)


Validation is very simple with the ASPxCaptcha control. ASPxCaptcha has a boolean property called Valid. Use this property to decide your next action after verification. For example, you can redirect the user to a different page:

ASPxCaptcha.Valid Boolean property

The functional element TextBox has a built-in validation mechanism like all the rest of our Edit-controls. This means that you don’t need to write extra code, if ChallengeImage test doesn’t pass. The ASPxCaptcha will automatically display the error message for you:

ASPxCaptcha - Built-in TextBox Validation

Check out the validation properties available to you:

ASPxCaptcha - TextBox Validation Properties

Release Date

The ASPxCaptcha control will be part of the DXperience 2010 volume 1 release. The unofficial release date is sometime in April 2010.

The DevExpress ASP.NET dev team has done an outstanding job of providing a flexible, easy-to-use and powerful Captcha control. Drop me a line below with your thoughts on this new control.

DXperience? What's That?

DXperience is the .NET developer's secret weapon. Get full access to a complete suite of professional components that let you instantly drop in new features, designer styles and fast performance for your applications. Try a fully-functional version of DXperience for free now:

25 comment(s)
Joe Hendricks

This is great news!  For compliance with disability codes, it would be great to have an audio option as well.. - Joe

23 February, 2010
Gary L Cox Jr [DX-Squad]

A lot of Captcha these days are moving into Images, "What is this Image to you?", the user names the image what they feel it is and that image sticks with your account as a way to identify you.  Will this support images as well?

23 February, 2010

Gary, have you got an example of that? I'm curious...

23 February, 2010
Randall Sexton

Very cool.  Looking forward to seeing it in action.

23 February, 2010
Mehul Harry (DevExpress)


I'll be discussing the image generation of the ASPxCaptcha in a future post and how our captcha was developed based on strong captcha guidelines using charactersets.

However, you're probably thinking of how a bank login screen. Those are not traditional captcha's. Sure they have image test but the tie into your local users db. Which would still have to be handled by you. I believe you can create something like using ASPxImage control on your login screen.

23 February, 2010
Shane Bekker

Hi Mehul,

Nice to have but please remember a truly useful captcha control would allow for control of the image warping effect as determined spam reapers can detect some text warping algos, also letter overlap should be considered and captcha controls should always have a accessibility option for voice.


23 February, 2010
Peter Thorpe

I'm glad these seem to be human readable first time unlike some of the implementations I have seen where it can take a couple of attempts.


Agreed audio option would be a nice addition although not vital for a first release. I have noticed this on more and more sites which use captchas.

23 February, 2010
Gary L Cox Jr [DX-Squad]


Thanks, I'm interested in seeing how you guys designed the CAPTCHA.  Most Captcha these days have been cracked, Yahoo, Microsoft, Google, Google Audio, etc.  Captcha is a tough barrier these days since a lot of these are not able to do what they are designed for, prevent non-human entry.  This is why Captcha is starting to move into images because a bot or application cannot figure out an image and what it is.  You throw up an image of say an "Apple" and ask the user what is in the image, they enter Apple and it passes.

23 February, 2010
Shane Bekker


While image captcha is definitely a better proposition is still poses problems for accessibility. Text based captchas i believe will still be around for a long time as I have seen many that even the best ocr engine cant decipher but are still readable even if with a refresh and they can still be made accessible.

It reaches the point between required computing power for a robot engine becomes non profitable.

24 February, 2010
Abdul Rauf

Well done, waiting for release.

24 February, 2010
Conrad Marc Akunga


What's the point of disabling the textboox? How then do you enter the captcha?

24 February, 2010
Zack Jones

Would it be possible to add a property to specify the spacing between letters/numbers? Sometimes I find them difficult to read. In fact the first example in the post 6yhr8 is a pretty good example of one that's difficult for me to read.

24 February, 2010
Brendon Muck [DevExpress MVP]

I think a captcha control also needs an audio component for disabled users that "speaks" the captcha string to the user. I'm not sure one could design a section 508 compliant site without this feature.


24 February, 2010
Aaron Smith

This is great, it's just too bad captcha has been broken so often and so easily that it's really no longer effective. For all of the forums that I've had to maintain, we just removed captcha altogether because at the strength required, people couldn't read it at all.

The one thing that worked almost all of the time, simple math questions.

What is 1x1?

The robots never got it right, but they beat most captcha implementations ever time.

24 February, 2010
Soner Gönül


That's great

25 February, 2010

me not understand that why tdy devloper is control oriented..

we sholud code oriented insted of code/logic oriented

25 February, 2010
Muhammad Imran Ansair

That's great......

One step ahead to captured the IT World... ;-)

If it works with voice then it will be extra ordinarycontrol...

26 February, 2010

Hi, yeah I would also like to suggest an audio version as well... I currently have a Catpcha that has audio and would love to migrate away from that to this control since I already use most everything DX. :-)

26 February, 2010
Elvin Chen

Very useful control. But frankly, a little late.

26 February, 2010
James Scrivener

This is great news, can't wait to use it!

26 February, 2010
Jim Hawley

I have to agree with everyone else about the accessibility aspect Mehul, this is exactly in line with what we discussed in Paris on the subject. Without audio it can't be used in sites that must be accessible.

Otherwise I am looking forward to it. Like others here I use a Captcha control from another company and will be glad to have the chance to check this one out.

Thanks for the info!

27 February, 2010
Mehul Harry (DevExpress)

Hi Guys,

Thanks for your feedback. And good news, check the update on the ASP.NET captcha here:

2 March, 2010
Gary Stafford

Looking forward to the release of this tool. Can't wait to use it for our site.

8 March, 2010
Tolga Erdogus

Does ApsxCaptcha come with a clientside validation api and model?

Is it available in the beta of the 2010 Q1 volume right now?

30 April, 2010
Mehul Harry (DevExpress)


Yes, it absolutely does have a client-side api and functionality like our ASP.NET controls.

And YES, it is available in the DXperience v2010.1 beta now. :)

30 April, 2010

Please login or register to post comments.