Using SuperCaptcha in development
- First, You need to refer SuperCaptcha.Mvc dll in your MVC web site project. You can do this by using any of the following steps
- Download the solution from codeplex. Open it in Visual Studio. Build SuperCaptcha.Mvc project in Release mode. Use the built dll.
- Download SuperCaptcha.Mvc dll from Downloads section.
- You can use
nuget package.
- Once the library is referenced, you can use it your view like using the following syntax
@Html.Captcha() - Razor view
<%: Html.Captcha() %> - Web Form View - You can also bind model property to the Captcha control. First, you need to add CaptchaText. Note that the property name should always be 'CaptchaText'. The validation attributes are not mandatory. For verifying entered Captcha text
you need to use [VerifyCaptcha]. The validation will be done on tab change from the input text box.

After the view model change. you need to change the view as well.

- In this library the default length of the Captcha code is 6. There is a provision to change this length by using an app setting in web.config