- Do you use nuget? if you don’t, right-click on the link in your project and select the link for the ad library package
- go to the online tab and install dll Microsoft Web Helpers
- In this confirmation you will find a very handy helper that is ReCaptcha.GetHtml
You can use it in your view as shown below;
@ReCaptcha.GetHtml(ConfigurationManager.AppSettings["recaptcha-public-key"], "white")
recaptcah web.config, ConfigurationManager.AppSettings . http://www.google.com/recaptcha
, :
if (ReCaptcha.Validate(ConfigurationManager.AppSettings["recaptcha-private-key"])) {
} else {
}
, .
1
Uppps. _ViewStart.cshtml, ;
@{
Layout = "~/Views/Shared/_Layout.cshtml";
ReCaptcha.PrivateKey = ConfigurationManager.AppSettings["recaptcha-private-key"];
ReCaptcha.PublicKey = ConfigurationManager.AppSettings["recaptcha-public-key"];
}