Installation instruction:
- Unzip the downloaded file.
- Copy MSCaptcha.dll and MSCaptcha.xml files to your /bin application directory.
- In your ASP.NET application, add reference to mscaptcha.dll file.
- Modify your web.config file, by adding this line to <httphandlers> section:
<add verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/>
If using IIS 7, add name parameter .
If using Captcha version 4, use "MSCaptcha.captchaImageHandler" instead. - Add MSCaptcha control to your Visual Studio toolbox (optional)
- That's it!
- Add line to your .aspx file:
<%@ Register Assembly="MSCaptcha" Namespace="MSCaptcha" TagPrefix="cc1" %> - Where needed, add the control itself:
<cc1:CaptchaControl ID="ccJoin" runat="server" CaptchaBackgroundNoise="none" CaptchaLength="5"CaptchaHeight="60" CaptchaWidth="200" CaptchaLineNoise="None" CaptchaMinTimeout="5"CaptchaMaxTimeout="240" /> - Put a textbox somewhere in your page where your user must enter what he sees in your captcha. Put this code (this example is in C#) to validate user input:
ccJoin.ValidateCaptcha(txtCap.Text);if (!ccJoin.UserValidated)
{
//Inform user that his input was wrong ... return;
}
In this particular example the ccJoin is the name of the Captcha control, the txtCap is the textbox where user entered what he sees in Captcha.
Captcha 4.0 Download: Here...
No comments:
Post a Comment