ASP.NET 3.5 and above only

Captcha - Knowledge Base

« Back to Knowledge Base list

In dynamically loaded usercontrol

Q:

I need to find solution for this issue.
There is a project with masterpage that is changed in pre_init according to HOST_NAME and there are many usercontrols loaded in code behind.
I found, that captchaimage url contains primary path with querystring attributes, in my case:
http://vvv.vyvojaplikaci.net/stranka.aspx?oboutcaptchaguid=1785160029&width=200&height=40

but to work with my solution I need to add some querystring parameters to captchaimage src:
http://vvv.vyvojaplikaci.net/stranka.aspx?oboutcaptchaguid=1785160029&width=200&height=40&lang=cs&pageid=2504 
lang and pageid is essential for this portal.

I have tried to add it on client side using jqeury, it worked well but only for the first image (afrer generate new image it failed again).

A:

Set the GetImageMode property of the CaptchaImage contol to HttpHandler.
Don’t forget to place the OboutCaptchaHandler.ashx file (from the Suite) in the same folder as the page with the Captcha control is.

"Thank you!!! ... Awesome customer service!! :)"

Romi Kovacs

Random testimonial   All testimonials