Set Captcha Numbers

4 posts, 2 answers
  1. Joseph
    Joseph avatar
    21 posts
    Member since:
    Mar 2013

    Posted 01 Apr 2013 Link to this post

    Hi,

    How to use only numbers in RadCaptcha?

    Thanks,
    Joseph.
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 01 Apr 2013 Link to this post

    Hi Joseph,

    You can set the CaptchaImage-TextChars property of the RadCaptcha to Numbers so that only numeric characters appear in the RadCaptcha Image.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Joseph
    Joseph avatar
    21 posts
    Member since:
    Mar 2013

    Posted 02 Apr 2013 Link to this post

    Hi Princy,

    Thanks for the reply. Is it possible to cancel the default validation mechanism and add a custom one? Is there any custom validation method to do so?
  5. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 02 Apr 2013 Link to this post

    Hi Joseph,

    The event CaptchaValidate is fired berfore the control is validated. This event allows you to execute server-side code on RadCaptcha validation, to cancel the default validation mechanism of the captcha control and to specify your own logic for validating the RadCaptcha.
    Please check the sample C# code provided below.

    C#:
    protected void RadCaptcha1_CaptchaValidate(object sender, CaptchaValidateEventArgs e)
    {
        e.CancelDefaultValidation = true; //Cancel the default validation mechanism.
      
        // Your logic to perform custom validation.
    }

    Thanks,
    Princy.
Back to Top