Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bhaumikpatel/recaptcha.mvc.demo
Google reCAPTCHA for MVC 4 and 5
https://github.com/bhaumikpatel/recaptcha.mvc.demo
Last synced: about 1 month ago
JSON representation
Google reCAPTCHA for MVC 4 and 5
- Host: GitHub
- URL: https://github.com/bhaumikpatel/recaptcha.mvc.demo
- Owner: bhaumikpatel
- Created: 2015-06-13T04:31:46.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-05T05:20:16.000Z (over 9 years ago)
- Last Synced: 2024-10-12T06:52:30.693Z (2 months ago)
- Language: C#
- Size: 10.9 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Google reCAPTCHA MVC
Protect your website from spam and abuse while letting real people pass through with ease
[**DEMO and Full Document**](http://recaptchamvc.apphb.com/)
Basic useful feature list:
* reCAPTCHA API verion 2.0 Support
* The color theme of the widget. (dark, light)
* The type of CAPTCHA to serve. (audio, image)### Installing reCAPTCHA for MVC
If the Package Manager Console is not visible in your Microsoft Visual Studio IDE, click on the **Tools > Library Package Manager > Package Manager Console** menu.```
PM> Install-Package reCAPTCH.MVC
```### How to Set reCAPTCHA Key in Web.config File
In the **appSettings** section of your web.config file, add the keys as follows:
```xml
```
**Note:** The **appSettings** keys are automatically added to your web.config file if you install reCAPTCHA for .NET through Nuget. However, you would still need to provide your own public and private keys in the web.config file of your project.
### How to Use reCAPTCHA in MVC Web Application
```csharp
@using reCAPTCHA.MVC
@using (Html.BeginForm())
{
@Html.Recaptcha(publicKey:"xxxxxxxxxxxxx",theme: CaptchaTheme.Dark,type:CaptchaType.Image,
callback: "verifyCallback",expiredCallback:"expiredCallback")
@Html.Recaptcha()@Html.ValidationMessage("ReCaptcha")
}
```