views:

199

answers:

2

I have a recaptchavalidator, which is inside an updatepanel:

        <asp:updatepanel runat=server id=updatepanel1>

    <cc1:recaptchacontrol runat=server publickey=.. privatekey=.. id=recaptchavalidator1/>
<asp:button runat=server id=button1/>
</updatepanel>

I am sure that some of you can guess what happens. For those of you who haven't experienced this before, the recaptchacontrol disappears! I have tried redirecting to the same page if the recaptchacontrol returns a false validation, but this has resulted in complex codebehind, and loss of veiwstate. Is there a simple solution to this? I have looked over some articles on the web, but they seem to be complex and not well structured. I need to change the content of the updatepanel, so keep this in mind.

Thank you for your help.

A: 

For the record, I am not completely satisfied with this answer, but here is an answer that I found that has me partially satisfied.

http://sanzon.wordpress.com/2008/05/11/aspnet-ajax-updatepanel-postback-trick-with-recaptcha/

geoff
A: 

This explains things better I guess

Automatically reload reCAPTCHA when postingback via a partial refresh (UpdatePanel)

naveen