JQuery file need to be loaded before that line
@Html.Captcha(....
And everything work smooth!
Question
I am using Captcha Mvc 4.0 (Vyacheslav)
Here is my code:
@Html.Captcha("Refresh", "Enter the text shown in imag"
, 5, "Is required field.", false)
And here is the problem:
It is working smooth but refresh button is not showing, and it is due to style="display:none;"
<a href="#CaptchaImage" id="5f88fe4e11e743c6a8a8430de57cfcff"
onclick="______f9192ce4675540129ec6f99adc316d82________()"
style="display:none;">Refresh</a>
How to make it visible?
La solution 2
JQuery file need to be loaded before that line
@Html.Captcha(....
And everything work smooth!
Autres conseils
In the code he does a .show() which only works if jquery is loaded. To fix this either import jquery before calling the method or do the following which will separate out the markup and the script.
@{
var captcha = @Html.Captcha("Refresh", "Enter the text shown in imag"
, 5, "Is required field.", false)
}
@captcha.RenderMarkup()
@section scripts
{
@captcha.RenderScript()
}