I'm attempting to implement a WebCaptcha (2011.1) in VS2010 using .NET 4.0. Whenever I attempt to validate the results of the WebCaptcha, it fails. On inspection, I've noticed that the Value of the captcha in a breakpoint after postback is an empty string.
I'm attempting to implement it as part of a user registration process inside a CreateUserWizard step.
Here's the declaration of the control in the markup:
<ig:WebCaptcha ID="WebCaptcha1" runat="server" Width="250px"> <InputValueEditor NullText="write text from image" Width="175px" ID="_editor"></InputValueEditor> <SubmitButton Text="Submit" Visible="False"></SubmitButton> </ig:WebCaptcha>
It's all the default settings, except for hiding the submit button, but it fails when I use the submit button from the control itself anyway.
Here's the code for checking the validation on CreatingUser event:
Dim captcha As WebCaptcha = CType(Me.RegisterUser.CreateUserStep.ContentTemplateContainer.FindControl("WebCaptcha1"), WebCaptcha) captcha.Validate() If Not captcha.IsValid Then e.Cancel = True End If
There's not much more code to share but I can put up anything that's needed.
Thanks.
Did you ever get past this? I am currently having the same issue.
Thanks,
We filed a Support Case with them and their answer was that the ScriptManager shouldn't be on the Master Page while the CAPTCHA is on the webpage. We responded and reminded them that it's standard practice to put the ScriptManager on a Master Page since other controls might need access to it, as in our case where we're also using a WebDataMenu. They're still investigating last we heard.