I think the question says it all,
using the default template in Register.aspx, I already customized the CreateUserWizard with a Captcha control, i also have some Business logic to be checked before adding the user, I have tried the following way but it didn’t work, the user is being added anyway even if e.Cancel is True
Protected Sub CreateUserWizard1_CreatingUser(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.LoginCancelEventArgs) Handles CreateUserWizard1.CreatingUser
Dim Captcha As RecaptchaControl = CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("recaptcha1"), RecaptchaControl)
If Not (Captcha.IsValid and ValidateUserEntries) Then
e.Cancel = True
End If
End Sub
Any Suggestions, How would I do this?
as @Jupaol said in the question comments,
e.Cancel = Trueactually does the trick to stop the creation of the new user, however the reason was theCaptcha.IsValidit was always returning true!, after a little search i got it to work by getting a new api key