Captcha image validation: in C # .net and asp.net

How can I verify a captcha image using asp.net forms?

+5
source share
4 answers

A few things to look at:

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

+13
source

Down MSCaptcha.dll DLL , Bin aspx

<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>

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";
                }

0
source

All Articles