BotDetect jQuery CAPTCHA Documentation

This page is an index of BotDetect Captcha documentation regarding jQuery Captcha integration and validation code examples available in different versions of BotDetect.

Related information can be found in similar pages about Ajax Captcha and JavaScript Captcha.

jQuery CAPTCHA in ASP.NET

BotDetect ASP.NET Captcha can be validated using jQuery Ajax requests based on the jquery.validate.js jQuery plugin (shown in the jQuery Validate Captcha example), or ASP.NET extensions of same used in unobtrusive validation of both ASP.NET MVC and ASP.NET WebForms fields (shown in the ASP.NET MVC Captcha example and the ASP.NET 4.5 WebForms Captcha example). Alternatively, it is possible to use jQuery Ajax requests to get the JSON Captcha validation result directly (shown in the ASP.NET MVC jQuery Captcha example).

ASP.NET jquery.validate.js CAPTCHA Code Example

This example project shows how to integrate BotDetect ASP.NET Captcha validation with jQuery Validation client-side form validation.

Client-side validation is not secure by itself (it can be bypassed trivially by bots that don't execute JavaScript at all), so the sample shows how the protected form action must always be secured by server-side Captcha validation first, and uses client-side validation only to improve the user experience.

.NET Version Default Source Code Folder Online Source
.NET 4.5 C:\Program Files\Captcha Inc\BotDetect 4 CAPTCHA Component\Asp.Net\.NET4.5\WebApp\ AspNetWebFormsJQueryValidationCaptchaExample
.NET 4.0 C:\Program Files\Captcha Inc\BotDetect 4 CAPTCHA Component\Asp.Net\.NET4.0\WebApp\ AspNetJQueryValidationCaptchaExample
.NET 3.5 C:\Program Files\Captcha Inc\BotDetect 4 CAPTCHA Component\Asp.Net\.NET3.5\WebApp\ AspNetJQueryValidationCaptchaExample
.NET 2.0 C:\Program Files\Captcha Inc\BotDetect 4 CAPTCHA Component\Asp.Net\.NET2.0\WebApp\ AspNetJQueryValidationCaptchaExample

ASP.NET MVC jQuery Ajax CAPTCHA Code Example

The ASP.NET MVC jQuery Ajax Captcha VB.NET ASPX example project shows how to perform Ajax Captcha validation using a jQuery $.getJSON call on the client combined with an ASP.NET MVC JsonResult Controller action on the server.

Both the client-side code (located in Scripts\CheckCaptcha.js) and the server-side code (Controllers\ExampleController.vb) are very simple, and allow BotDetect Captcha protection to be added in a variety of custom Ajax forms and scenarios.

ASP.NET MVC Default Source Code Folder Online Source
ASP.NET MVC 5.0 C:\Program Files\Captcha Inc\BotDetect 4 CAPTCHA Component\Asp.Net\.NET4.5\WebApp\ AspNetMvc50AjaxCaptchaExample
ASP.NET MVC 4.0 C:\Program Files\Captcha Inc\BotDetect 4 CAPTCHA Component\Asp.Net\.NET4.5\WebApp\ AspNetMvc40AjaxCaptchaExample

ASP.NET MVC Application Template CAPTCHA Code Example

This example project shows how to use the BotDetect MvcCaptcha control in ASP.NET MVC web applications.

Starting with the default ASP.NET MVC example project, the example includes all code required to add Captcha validation to the Account controller Register action.

The ASP.NET MVC application template Captcha example inlcudes jQuery code required to integrate Captcha validation with ASP.NET MVC unobtrusive validation.

ASP.NET MVC Default Source Code Folder Online Source
ASP.NET MVC 5.0 C:\Program Files\Captcha Inc\BotDetect 4 CAPTCHA Component\Asp.Net\.NET4.5\WebApp\ AspNetMvc50ApplicationTemplateCaptchaExample
ASP.NET MVC 4.0 C:\Program Files\Captcha Inc\BotDetect 4 CAPTCHA Component\Asp.Net\.NET4.5\WebApp\ AspNetMvc40CaptchaExample

ASP.NET 4.5 WebForms Application Template CAPTCHA Code Example

This example project shows how to add BotDetect CAPTCHA protection to the registration form included in the default ASP.NET 4.5 Web Forms Application project template coming with Visual Studio.

The example shows how to include BotDetect CAPTCHA validation in new user data validation for the example Register form

The example also shows how to complement server-side CAPTCHA validation with client-side Ajax CAPTCHA validation using ASP.NET 4.5 unobtrusive validation applied to all form fields.

Visual Studio Default Source Code Folder Online Source
Visual Studio 2013 C:\Program Files\Captcha Inc\BotDetect 4 CAPTCHA Component\Asp.Net\v4.5\WebApp\ AspNetWebFormsVS2013AppTemplateExample
Visual Studio 2012 C:\Program Files\Captcha Inc\BotDetect 4 CAPTCHA Component\Asp.Net\.NET4.5\WebApp\ AspNetWebFormsVS2012AppTemplateExample