BotDetect jQuery CAPTCHA Documentation

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

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

jQuery CAPTCHA in PHP

PHP jquery.validate.js CAPTCHA Code Sample

This sample project shows how to integrate BotDetect PHP 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.

Default Source Code Folder Online Source
samples/php_jquery_validation_captcha_sample

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 sample), 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 sample and the ASP.NET 4.5 WebForms Captcha sample). 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 sample).

ASP.NET jquery.validate.js CAPTCHA Code Sample

This sample 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\Lanapsoft\BotDetect 3 CAPTCHA Component\Asp.Net\v4.5\WebApp\ AspNetJQueryValidationCaptchaSample
.NET 4.0 C:\Program Files\Lanapsoft\BotDetect 3 CAPTCHA Component\Asp.Net\v4.0\WebApp\ AspNetJQueryValidationCaptchaSample
.NET 3.5 C:\Program Files\Lanapsoft\BotDetect 3 CAPTCHA Component\Asp.Net\v3.5\WebApp\ AspNetJQueryValidationCaptchaSample
.NET 2.0 C:\Program Files\Lanapsoft\BotDetect 3 CAPTCHA Component\Asp.Net\v2.0\WebApp\ AspNetJQueryValidationCaptchaSample

ASP.NET MVC jQuery Ajax CAPTCHA Code Sample

The ASP.NET MVC jQuery Ajax Captcha VB.NET ASPX sample 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\SampleController.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\Lanapsoft\BotDetect 3 CAPTCHA Component\Asp.Net\v4.5\WebApp\ AspNetMvc50AjaxCaptchaSample
ASP.NET MVC 4.0 C:\Program Files\Lanapsoft\BotDetect 3 CAPTCHA Component\Asp.Net\v4.5\WebApp\ AspNetMvc40AjaxCaptchaSample

ASP.NET MVC Application Template CAPTCHA Code Sample

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

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

The ASP.NET MVC application template Captcha sample 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\Lanapsoft\BotDetect 3 CAPTCHA Component\Asp.Net\v4.5\WebApp\ AspNetMvc50CaptchaSample
ASP.NET MVC 4.0 C:\Program Files\Lanapsoft\BotDetect 3 CAPTCHA Component\Asp.Net\v4.5\WebApp\ AspNetMvc40CaptchaSample

ASP.NET 4.5 WebForms Application Template CAPTCHA Code Sample

This sample 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 sample shows how to include BotDetect CAPTCHA validation in new user data validation for the sample Register form

The sample 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\Lanapsoft\BotDetect 3 CAPTCHA Component\Asp.Net\v4.5\WebApp\ AspNetWebForms451CaptchaSample
Visual Studio 2012 C:\Program Files\Lanapsoft\BotDetect 3 CAPTCHA Component\Asp.Net\v4.5\WebApp\ AspNetWebForms45CaptchaSample

jQuery CAPTCHA in ASP Classic

ASP Classic jquery.validate.js CAPTCHA Code Sample

This sample project shows how to integrate BotDetect ASP Classic 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.

Default Source Code Folder Online Source
C:\Program Files\Lanapsoft\BotDetect 3 CAPTCHA Component\Asp\WebApp\AspJQueryValidationCaptchaSample