ASP.NET Captcha Control Sneak Peek

ASP.NET Team Blog
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

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: http://www.devexpress.com/Downloads/NET/

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.