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

Custom Textbox to enter captcha

3 Answers 169 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
Berkman
Top achievements
Rank 1
Berkman asked on 27 Feb 2013, 07:39 AM
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.

3 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 27 Feb 2013, 08:34 AM
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.
0
Berkman
Top achievements
Rank 1
answered on 27 Feb 2013, 05:10 PM
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.
0
Shinu
Top achievements
Rank 2
answered on 28 Feb 2013, 04:50 AM
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.
Tags
Captcha
Asked by
Berkman
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Berkman
Top achievements
Rank 1
Share this question
or