views:

1092

answers:

1

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?

A: 

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.

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