@using Microsoft.Web.Helpers; @{ var showRecaptcha = true; if (IsPost) { if (ReCaptcha.Validate()) { @:Your response passed! showRecaptcha = false; } else{ @:Your response didn't pass! } } } Testing Global Recaptcha Keys
@if(showRecaptcha == true){ if(ReCaptcha.PrivateKey != ""){

@ReCaptcha.GetHtml()

} else {

You can get your public and private keys at the ReCaptcha.Net website (http://recaptcha.net). Then add the keys to the _AppStart.cshtml file.

} }