Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Captcha > using captcha in loginpage

Not answered using captcha in loginpage

Feed from this thread
  • kham avatar

    Posted on Apr 20, 2011 (permalink)

    Hello,
        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?

    Reply

  • Pero Pero admin's avatar

    Posted on Apr 22, 2011 (permalink)

    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,
    Pero
    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.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Captcha > using captcha in loginpage