Custom Textbox to enter captcha

4 posts, 1 answers
  1. Berkman
    Berkman avatar
    23 posts
    Member since:
    Feb 2013

    Posted 27 Feb 2013 Link to this post

    Hello,

    There is  a Radcaptcha on my registration page. I want to use a custom RadTextbox where the user can enter the captcha characters apart from its native Textbox. How to implement this?

    Thanks in Advance,
    Berk.
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 27 Feb 2013 Link to this post

    Hello Berk,

    By setting the CaptchaImage.RenderImageOnly to true you can choose to render only the CaptchaImage without the RadCapthca TextBox and Label. Set the ValidatedTextBoxID to the ID of the TextBox which you want to be validated by the RadCaptcha. Please have a look at the following code.

    ASPX:
    <telerik:RadCaptcha ID="RadCaptcha1" runat="server" ErrorMessage="Invalid Captcha"
        CaptchaImage-TextLength="5" CaptchaImage-TextColor="Red" IgnoreCase="true" EnableRefreshImage="true"
        CaptchaImage-RenderImageOnly="true" ValidationGroup="Group" ValidatedTextBoxID="RadTextBox1">
    </telerik:RadCaptcha>
    <br />
    <telerik:RadTextBox ID="RadTextBox1" runat="server">
    </telerik:RadTextBox>
    <br />
    <telerik:RadButton ID="RadButton1" runat="server" Text="Submit" ValidationGroup="Group"
        OnClick="RadButton1_Click">
    </telerik:RadButton>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Berkman
    Berkman avatar
    23 posts
    Member since:
    Feb 2013

    Posted 27 Feb 2013 Link to this post

    Hello Shinu,

    Thanks for your prompt reply. I would like to an audio captcha on my website to target the visually impaired users but I am not familiar with that. Just now I come across the CaptchaImage-EnableCaptchaAudio property and set the value to true. Still there is some issues and I am unable to proceed with that. Please help.

    Thanks in Advance,
    Berk.
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 27 Feb 2013 Link to this post

    Hello Berk,

    The RadCaptcha control can generate an audio code which can be enabled by setting the CaptchaImage-EnableCaptchaAudio property to true. This will cause a link button, that retrieves the audio code, to be rendered below the CaptchaImage. Your issue is apart from setting the above mentioned property to true, you need to make some configurations in the App_Data.

    Try the following steps to configure RadCaptcha to generate audio code.

    1. In the Solution Explorer, right click the Project and select Add | Add ASP.NET folder | App_Data.
    2. Locate the App_Data folders in your RadControls installation.    
    3. Copy the App_Data\RadCaptcha to the project's \App_Data folder. The RadCaptcha folder in the RadControls installation contains the various .wav files that are required to generate the audio code.
    4. Enable the CaptchaAudio feature by setting the CaptchaImage - EnableCaptchaAudio property to true.

    Now on running the application RadCaptcha validates the input on a post back.

    Thanks,
    Shinu.
Back to Top