Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Captcha > captcha without textbox validation how?

Not answered captcha without textbox validation how?

Feed from this thread
  • Gaurav avatar

    Posted on Aug 17, 2011 (permalink)

    I am using Telerik captcha control without textbox and now i want to validate this with my own textbox value.

    my code is this

        <telerik:RadCaptcha ID="RadCaptcha" runat="server" EnableRefreshImage="true" CaptchaTextBoxCssClass="text"
                                                                        ProtectionMode="Captcha" Display="Dynamic" ErrorMessage="Invaid Code" CaptchaImage-TextColor="Black"
                                                                        CaptchaImage-RenderImageOnly="true" CaptchaImage-Width="219" CaptchaImage-TextChars="CustomCharSet"
                                                                        CaptchaImage-CharSet="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
                                                                        CaptchaImage-ImageCssClass="captchIMG" CaptchaImage-Height="36" CaptchaImage-BackgroundNoise="None"
                                                                        CaptchaImage-LineNoise="High" />

    and a single seperate text box for validate its value

        <asp:TextBox ID="txtCaptcha" runat="server" CssClass="text" />

    Now on button click event i want to validate this captcha text but how???

    Reply

  • Slav Slav admin's avatar

    Posted on Aug 18, 2011 (permalink)

    Hi Gaurav,

    Please follow these suggestions in order to achieve the desired functionality:

    1. The property ValidationGroup of the RadCaptcha and the button, that triggers postback, should have the same value.

    2. The ValidatedTextBoxID property of RadCaptcha should be set to the ID of the TextBox which you want to be validated. This is demonstrated in the following online demo: http://demos.telerik.com/aspnet-ajax/captcha/examples/refreshimage/defaultcs.aspx.

    3. In the button's click event handler, you can use the IsValid property of RadCapthca to validate the input for the captcha. In this online demo you can check a scenario, in which the IsValid property is used.

    I would also suggest the Getting Started help article, which contains useful information on utilizing the RadCapthca control.

    You can find attached a sample page, implementing the desired functionality. Please use it as a base for your further development.

    Kind regards,
    Slav
    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.

    Attached files

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Captcha > captcha without textbox validation how?