This is a migrated thread and some comments may be shown as answers.

Nested userControl

5 Answers 73 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
ghazal
Top achievements
Rank 1
ghazal asked on 12 Dec 2010, 01:34 PM
Hi
I have 4 nested user Control which are add to my default page at run time.(I mean in my default page,there is place holder ,which the first user control will be added to this at run time, and in this way i have the 4 usercontrol nested )
The Fourth UserControl Contains the Capcha, but it always returns false.
when i load my controls in init function the third user control wont be added , and otherwise when i add my controls in page_load function ,the capcha returns false,
How can i solve this?
any one knows?

Thank in advance
Ghazal

5 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 15 Dec 2010, 12:29 PM
Hi Ghazal,

In the new SP release, which should be out by the end of the week, we have improved the RadCaptcha control to be able to add the control dynamically at a later stage (than Page.Init, such as Page.Load), and still correctly validate the code entered.
So, after the SP is official please upgrade your project to the latest DLL, and your issue will be fixed. For the time being, you could test the latest internal build to see if everything is working.

Kind regards,
Pero
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Kevin
Top achievements
Rank 1
answered on 19 Apr 2013, 03:43 PM
I am still having problems with this.  I have a radcaptcha in a nested user control that I am building dynamically. 

so Page.aspx > Container.ascx > Form.ascx 

So the Form.ascx has the radcaptch that is on the page with validation

However the form.ascx is instantiated dynamically from code behind in the Container.ascx, and the container.ascx is registered in the web.config. 

The page calls the web.config registered user control and when I try to refresh my radcaptcha the image dissapears and the control will not validate.

0
Slav
Telerik team
answered on 24 Apr 2013, 08:44 AM
Hello Kevin,

I tried to reproduce the problem you reported, but to no avail. Please compare the attached test sample with your actual project and check if there are differences in the setup as I may have missed something.

You can try if the issue persists after configuring the captcha to use the Session as a storage location for its image, because currently there is a problem with the Cache storage location (set by default) when the page is accessed by multiple users. To do so, please follow the first two steps in this help article.

If you are still having difficulties, please try modifying the attached sample in order to recreate your scenario and open a support ticket in order to send it. In case this is not possible, you can also send a simple, fully runnable page that isolates the problem so that I can inspect it locally and provide a more to the point answer.

Regards,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Kevin
Top achievements
Rank 1
answered on 08 May 2013, 11:13 AM
I have figured out the problem.  Ironically it was something very simple but I just happened upon it.  I will post it here in case someone else runs into this problem.  The problem was simple I had an asp placeholder control in my user control with an ID of MainContent and I had another asp placeholder control on my page with the same ID (MainContent).  When I changed the name of the place holder control in my user control my problems stopped.  I verified this by going back and forth a couple of times and if the placeholder had the same ID it would cause a problem.  I wouldn't have expected this but that was my solution change the ID of my placeholder in my usercontrol.
0
Slav
Telerik team
answered on 13 May 2013, 08:19 AM
Hello Kevin,

It is strange that the case you described would cause a problem with the RadCaptcha. Could you please send a runnable sample project that isolates your scenario locally so that I can reproduce the issue and determine whether it is related to the captcha control?

Greetings,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Captcha
Asked by
ghazal
Top achievements
Rank 1
Answers by
Pero
Telerik team
Kevin
Top achievements
Rank 1
Slav
Telerik team
Share this question
or