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.”;
    }
}
Advertisements

Published by

Alan Feekery

Developer, Gamer, Musician, Cyclist and big Motorsport fan... enjoys the odd cup of coffee :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s