6

How can I have Captcha image verification using asp.net forms?

4 Answers 4

14

A couple of things to look at:

That was after a couple of minutes of searching - I'm sure you can find more.

3
  • +1 Damn you Mr Skeet, you beat me to the punch.
    – rook
    Mar 3, 2010 at 7:17
  • reCAPTCHA .NET library is perfect library but BotDetect ASP.NET CAPTCHA Free Trial Version
    – AjmeraInfo
    Mar 3, 2010 at 7:22
  • I am using BotDetect now on a new project. I chose it because it has no external dependencies, supports audio, and has multiple locale support. Full source available for $600. Mar 8, 2011 at 19:35
3

I have used this one first: http://www.codeproject.com/KB/custom-controls/CaptchaControl.aspx

But I've had massive spam problems by bots. Using ReCaptcha works perfect so far.

0
2

this http://www.codeproject.com/KB/custom-controls/CaptchaControl.aspx will do great...

2
  • use reCapthca it is alot more secure.
    – rook
    Mar 3, 2010 at 19:01
  • Are you sure about that? I heard a friend hacker that captcha gives information to x companies that generated text at x time will be y and in this way they can spam...
    – HasanG
    Mar 31, 2010 at 8:40
1

First of all Down load the MSCaptcha.dll from net import that dll in toolbar and also add references in your Bin folder In aspx file write the following Code

<cc1:CaptchaControl ID="CaptchaControl1" runat="server" 
                                     CaptchaBackgroundNoise="Low" CaptchaLength="6" 
                                     CaptchaHeight="60" CaptchaWidth="200" 
                                     CaptchaLineNoise="None" CaptchaMinTimeout="5" 
                                     CaptchaMaxTimeout="240" FontColor="#529E00"/>
<asp:Label ID="lbl" runat="server" Text="Verification Code *" style="display: inline-block;width: 200px;line-height: 1.8; vertical-align: top; font-size: 12px;font-weight:bold;"></asp:Label>
 <asp:TextBox ID="txtcaptcha" runat="server" Height="22px" Width="325px" style="border: 1px solid #900;"></asp:TextBox>

and in code behind file write

CaptchaControl1.ValidateCaptcha(txtcaptcha.Text.Trim());
     if (CaptchaControl1.UserValidated)
                {
                    lbierror.ForeColor = System.Drawing.Color.Green;
                    lbierror.Text = "Valid";
                }
                else
                {
                    lbierror.ForeColor = System.Drawing.Color.Red;
                    lbierror.Text = "InValid Captacha";
                }

I hope this will work

Not the answer you're looking for? Browse other questions tagged or ask your own question.