Created
February 17, 2018 13:01
-
-
Save MoienTajik/f78de6c502cf295d2990b86cfcd693e8 to your computer and use it in GitHub Desktop.
Using Google reCAPTCHA in ASP.NET MVC - Test Controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestController : Controller | |
{ | |
[HttpGet] | |
public ActionResult Create() | |
{ | |
return View(); | |
} | |
[HttpPost] | |
[ValidateAntiForgeryToken] | |
[ValidateGoogleCaptcha] | |
public ActionResult Create(string title) | |
{ | |
// If we are here, Captcha is validated. | |
return View(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment