Balu
Balu

Reputation: 43

The Name Recaptcha does not exist in the current context

I am trying to validate Google Recaptcha.

  1. I added the dll.
  2. Implemented the design.

At the time of validating I am getting the error:

The Name Recaptcha does not exist in the current context.

[HttpPost]
public ActionResult Submit()
{
    if (ReCaptcha.Validate(privateKey: "<private key>"))
    {
        return Content("Valid Captcha");
    }
    else
    {
        return Content("InValid Captcha");
    }
}

Upvotes: 0

Views: 1157

Answers (0)

Related Questions