Radcaptcha on ajax page

2 posts, 0 answers
  1. JJ
    JJ avatar
    147 posts
    Member since:
    May 2010

    Posted 25 Jan 2011 Link to this post


    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">
    <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"

    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?



  2. Pero
    Pero avatar
    1156 posts

    Posted 26 Jan 2011 Link to this post

    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.

    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.
Back to Top