using captcha in loginpage

2 posts, 0 answers
  1. kham
    kham avatar
    4 posts
    Member since:
    Oct 2010

    Posted 20 Apr 2011 Link to this post

        I want to use captcha in my login page. I have username textbox and password textbox and loginbutton.
    If the username or password was fail three times i want to show captcha image and then after tens time i want to disable user.
    Any Suggestion?
  2. Pero
    Pero avatar
    1156 posts

    Posted 22 Apr 2011 Link to this post

    Hello Kham,

    You should convert the Login control to template (Use smart tag at design time) and then place the RadCaptcha control inside the Login's control. Make sure the Captcha has the same ValidationGroup set as the Login Button.
    Initially the RadCaptcha should have Visible="false" and Enabled="false".
    You should handle the Login.LoginError event to count the times a user has failed to log in. If there are more than 3 times, the RadCaptcha's Visible and Enabled properties are set to true. Use Login.FindControl("RadCaptcha1") as RadCaptcha to find the Captcha control placed inside the Login control.
    You should also handle the Login.LoggingIn event to test for the validity of RadCaptcha (RadCaptcha.IsValid). If the Captcha is not valid you should cancel the event.

    I hope this helps.

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