Tuesday, March 1, 2011

My reCaptcha gets Page.IsValid=False always... when using onClientClick="return validate()"

Hello,

I'm using reCaptcha in my asp.net 2.0 web application.

I'm using onClientClick="return validateForm()" on my submit button. validateForm does basic checking and stops the form from getting to the server if not needed...

For some reason, once the user passes the client side validation he always gets Page.IsValid="false"...

If I remove the onClientClick everything works just fine. What to do?

From stackoverflow
  • I don't know what's causing your problem, but you could try using the .NET reCAPTCHA library (available from http://recaptcha.net/plugins/aspnet/) if you aren't using it already. It uses ASP.NET validators, so you shouldn't need to do any custom client-side validation.

    bzlm : The official plug-in doesn't support ValidationGroup, so it too can cause strange problems. Beware!

0 comments:

Post a Comment