Posted on: 6/14/2012 11:55:44 AM | Views : 227

Hi,
I am using the .Net 4 password recovery control on my website and I am using it in conjunction with MSCAPTCHA.  My question is, how do I programtically validate the user in my code-behind?
I need to first validate the CAPTCHA then, if that is successful, validate the inputed username so it can then supply the challenge question.
Thanks.
Here is my code sample:
Protected Sub PasswordRecovery1_VerifyingUser(sender As Object, e As System.Web.UI.WebControls.LoginCancelEventArgs) Handles PasswordRecovery1.VerifyingUser Dim loginUsername As String = PasswordRecovery1.UserName Dim captchaImage As MSCaptcha.CaptchaControl = CType(PasswordRecovery1.FindControl("MSCaptchaImage"), MSCaptcha.CaptchaControl) Dim captchaEntry As TextBox = CType(PasswordRecovery1.FindControl("capthchaText"), TextBox) captchaImage.ValidateCaptcha(captchaEntry.Text) If Not captchaImage.UserVali ...

Go to the complete details ...