Behavior Settings
4 Mar 20161 minute to read
Regenerate Captcha
Captcha control supports regeneration of captcha image without full page refresh. You can achieve this by clicking refresh button. By default Captcha renders without refresh button. You can add the refresh button by setting EnableRefreshImage property to true.
NOTE
To refresh the Captcha image, include “RequestMapper”. It enables you to get or set name for the post action function.
The following code example is used to render the Captcha with Refresh support.
-
Add the following code example to the corresponding CSHTML page to render Captcha with Refresh button.
@Html.EJ().Captcha("captcha").EnableRefreshImage(true).RequestMapper("Refresh")
// Add the following code in controller page for Captcha with refresh image public ActionResult Refresh(CaptchaParams parameters) { return parameters.CaptchaActions(); }
-
The following screenshot illustrates the Captcha with Refresh button.
Audio Accessibility
Sometimes, Captcha characters are too hard to identify. In this case Captcha with audio helps to understand the Captcha character. Captcha supports captcha with audio. You can achieve this by enabling EnableAudio property to true. When this property is set true, captcha renders with audio button and when you click the audio button it readouts the captcha characters. By default Captcha renders without audio button.
The following code example is used to render the Captcha with Audio.
-
Add the following code example to the corresponding CSHTML page to render Captcha with audio button.
@Html.EJ().Captcha("captcha").EnableAudio(true)
-
The following screenshot illustrates the Captcha with audio button.