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

Radcaptcha on ajax page

1 Answer 94 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 26 Jan 2011, 03:39 AM

 

I have some ajax stuff on the page- fill one dropdown based on another dropdown's selection.
I also used Radcaptcha, when submit the page, the page alway  not valid, unless putting the radcaptcha inside the UpdatePanel .

 

<asp:UpdatePanel ID="UpdatePanel7" runat="server">
<ContentTemplate>
<telerik:RadCaptcha ID="RadCaptcha1" Runat="server" ValidationGroup="Group"
ErrorMessage="Page not valid. The code you entered is not valid.Page not valid. The code you entered is not valid"
ImageStorageLocation="Session">
</telerik:RadCaptcha>
</ContentTemplate>
</asp:UpdatePanel>

This will solve page not valid problem, but everytime when the ajax fired (first dropdown is selected), the Radcaptcha's text got changed.  Is there anyway that can prevent the Radcaptcha text changing everytime when the ajax fired?

Thanks

 

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 26 Jan 2011, 03:15 PM
Hi Jessie,

The RadCaptcha control changes its code on every trip to the server, no matter if its full or ajax postback. This cannot be overridden, because of security reasons.
You can create your custom captcha validation, based on our RadCaptcha component. A custom handler should be implemented to serve the image. Then you can create new images based on the fact whether ajax or full postback occurred.
I have attached a sample project showing how to implement a custom httpHandler.

Greetings,
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.
Tags
Captcha
Asked by
JJ
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or