0

I am new to asp.net mvc4, I already installed the Capchamvc4 package in asp.net mvc4 framework. How to get that installed package in the view page, pls help me. Thanks in advance.

Vetri
  • 77
  • 2
  • 3
  • 10

1 Answers1

0

Try this in your View

  @using Recaptcha
   @{
       Recaptcha.RecaptchaControlMvc.PublicKey = "PublicKey";
       Recaptcha.RecaptchaControlMvc.PrivateKey = "PrivateKey";
    }
    @Html.Raw(@Html.GenerateCaptcha("captcha", theme: "clean"))
Nilesh Gajare
  • 6,302
  • 3
  • 42
  • 73
  • Thank you for your comment. I have used this code in view page but it is not showing anything. By using this code, Whether it will show the captcha screen in view page or have to write to some other code in view page, Pls help me out – Vetri Feb 13 '14 at 06:30
  • are you using `Recaptcha` – Nilesh Gajare Feb 13 '14 at 06:31
  • I have installed politecaptcha, recapcha plugin for .net,capchamvc..But i dont know how to use it – Vetri Feb 13 '14 at 06:35
  • I have tried it,,It showing error ....Error msg:Input error: k: Format of site key was invalid – Vetri Feb 13 '14 at 06:47
  • Sorry for late reply,, Error msg-----Input error: k: Format of site key was invalid – Vetri Feb 13 '14 at 07:43
  • have you generated the key for `Recaptcha` just go to site and generate keys and paste it here – Nilesh Gajare Feb 13 '14 at 08:31