Home
About
Contact
Categories
Classic ASP (5 - Sub-Categories)
JavaScript (2 - Sub-Categories)
Databases (1 - Sub-Category)
ASP.NET (3 - Sub-Categories)
Delphi (1 - Sub-Category)
Windows Server Core (1 - Sub-Category)
VMWare (1 - Sub-Category)
New CFFCS Coding Source is still in Beta
Please report any errors to the [Contact] page. Thank you.
Classic ASP (5)
JavaScript (2)
Databases (1)
ASP.NET (3)
Delphi (1)
Windows Server Core (1)
VMWare (1)
Resources
[View The Source Code For This Project]
ASP.NET
C#
No Captcha ReCaptcha 2.0 with ASP.NET (C# Version)
HTML
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Load.aspx.cs" Inherits="Load" %>
Name
<% //You will need the new reCaptcha 2.0 Site Key for this. //Go here: https://www.google.com/recaptcha/admin //And add a new Site Key for your website. //For local testing, you will have to test with //local/site.asp //127.0.1/site.asp //It will not work with a static IP Address as I would prefer. %>
ASP.NET
Button1_Click
protected void Button1_Click(object sender, EventArgs e) { String strname = name.Text; String captcha = Request.Form["g-recaptcha-response"]; //Next we are going to make sure that each form variable has a value (Meaning: Filled out) if (strname == null || strname == "") { Label1.Text = "Please provide your name"; //next, we are going to challange the reCaptcha, to make sure that it is not blank, //and there is NO way around this. If it is not blank, then we send them a message. } else if (captcha == null || captcha == "") { Label1.Text = "You have not completed the
reCAPTCHA
Please click on the blank box.
Thanks You"; } else { // If the user has completed the reCaptcha, then we send a message letting them know.; Label1.Text = "Thank you for trying out the
ASP.NET (C# Version) / Jquery reCAPTCHA 2.0
demo."; } }
Preview
Tags
No Captcha ReCaptcha 2.0 with ASP.NET using C#
No Captcha ReCaptcha 2.0 with C# ASP.NET
stop bots and minimize spammers