>

Using reCAPTCHA with ASP.NET

Very simple bit of code to get running in the above link. The only thing about the dll Google supply is you must have MVC installed on your system, use the web platform installer if you haven’t got it. Also Google show the code in VB! Below is the reCAPTCHA control check code in CSharp for btnSubmit.

protected void btnSubmit_Click(object sender, EventArgs e)

    {

        if (RecaptchaControl1.IsValid)

        {

            Label1.Text = “You entered the correct captcha.”;

        }

        else

        {

            Label1.Text = “The captcha you entered is invalid.”;

        }

    }

blog comments powered by Disqus