reCAPTCHA not work with updatePanel

1,598 views
Skip to first unread message

krunal

unread,
Sep 14, 2011, 2:24:40 PM9/14/11
to reCAPTCHA
Hi frnds,

I am using reCaptcha in asp.net but its not working in my UpdatePanel
so is it required anythings that need to put with this.

I had check with conditional property, with all trigger if I had use
post trigger in my updatepanel then my page as postback so its not a
good solution is there anythings or I had miss anythings about this
captcha...


Thanks,
krunal

mikepope

unread,
Sep 14, 2011, 2:33:11 PM9/14/11
to reCAPTCHA
Probably you've done this, but you might want to post this question on
the asp.net forums also. (http://forums.asp.net/18.aspx/1?Web+Forms)

Adrian Godong

unread,
Sep 14, 2011, 2:39:23 PM9/14/11
to reca...@googlegroups.com
Compare your code with the currently working test on the repository:

Check UpdatePanel* files.


--
You received this message because you are subscribed to the Google Groups "reCAPTCHA" group.
To post to this group, send email to reca...@googlegroups.com.
To unsubscribe from this group, send email to recaptcha+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/recaptcha?hl=en.




--
Adrian Godong
adrian...@gmail.com

Joe Audette

unread,
Oct 20, 2011, 2:40:28 PM10/20/11
to reCAPTCHA
This test page from the repository with UpdatePanel does not work.
I try it using the CLR 2.

and when I submit an invalid entry in racaptcha it disappears from the
page. It should stay visible and give me a chance to correctly enter
the string.
It only works in the sense that it says "The verification words are
incorrect", so IsValid is false but the recaptcha should not disappear
from the page.

This is the same problem I face trying to use it inside an UpdatePanel
in my own project.

Any help would be greatly appreciated.

On Sep 14, 2:39 pm, Adrian Godong <adrian.god...@gmail.com> wrote:
> Compare your code with the currently working test on the repository:http://code.google.com/p/recaptcha/source/browse/trunk#trunk%2Frecapt...
>
> Check UpdatePanel* files.
>
>
>
>
>
>
>
>
>
> On Wed, Sep 14, 2011 at 11:24, krunal <mail4rao....@gmail.com> wrote:
> > Hi frnds,
>
> > I am using reCaptcha in asp.net but its not working in my UpdatePanel
> > so is it required anythings that need to put with this.
>
> > I had check with conditional property, with all trigger if I had use
> > post  trigger in my updatepanel then my page as postback so its not a
> > good solution is there anythings or I had miss anythings about this
> > captcha...
>
> > Thanks,
> > krunal
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "reCAPTCHA" group.
> > To post to this group, send email to reca...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > recaptcha+...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/recaptcha?hl=en.
>
> --
> Adrian Godong
> adrian.god...@gmail.com

Joe Audette

unread,
Oct 21, 2011, 12:16:57 PM10/21/11
to reCAPTCHA
I suspect that part of the reason it doesn't work correctly is because
of the way the scripts are added in the render method.
It might be possible to solve it by changing the scripts to be added
using ScriptManager.RegisterClientScriptBlock and or
ScriptManager.RegisterStartupScript.
Using these register methods should also prevent the main script from
being added more than once even if there is more than on recaptcha on
the page. So it may also eliminate the need for the check if there is
already a recaptcha on the page.

Adrian Godong

unread,
Oct 21, 2011, 12:30:42 PM10/21/11
to reca...@googlegroups.com, reCAPTCHA
I think you should use the AJAX API instead of the static script tag if you want more control.

UpdatePanel is a bloated abstraction layer for most public facing website needs.

---
Adrian Godong

Joe Audette

unread,
Oct 22, 2011, 11:34:04 AM10/22/11
to reCAPTCHA
Hi Adrian,

UpdatePanel is what it is but a lot of people use it because it makes
some things easier to implement.
This problem has existed for a long time and lots of people out there
googling for solutions.

I've implemented a solution in the RecaptchaControl that works inside
UpdatePanel.
I did change it to use the ajax api by default, but added a property
to enable using the previous implementation.

Would you like me to email you the changed files so it can be included
in the next release of the library?
I also updated the UpdatePanel test page to make it more realistic. It
uses UpdateMode="Conditional" and it has other validators on the page
to make sure it really works and plays nice with other validators.

Best Regards,

Joe


On Oct 21, 12:30 pm, Adrian Godong <adrian.god...@gmail.com> wrote:
> I think you should use the AJAX API instead of the static script tag if you want more control.
>
> UpdatePanel is a bloated abstraction layer for most public facing website needs.
>
> ---
> Adrian Godong
>

Raghavendra R

unread,
Nov 1, 2014, 3:37:26 PM11/1/14
to reca...@googlegroups.com
Hi can you please send me the updated files
Reply all
Reply to author
Forward
0 new messages