Subject: DNN Captcha Reigstration Wizard
Prev Next
You are not authorized to post a reply.

AuthorMessages
goforebrokeUser is Offline
New Poster
New Poster
Posts:20

06/27/2010 11:26 PM  

Mitchel,

I am using the DNN delivered captcha control within an asp registration wizard. I have followed the instructions in your Professional Dotnetnuke Module programming and your blog but I can not get the error message to display. I am sure its something simple but I can't seem to figure it out. Any ideas? Thank you

' Below are some of the event handlers for the Wizard Control

Protected Sub OnFinishButtonClick(ByVal sender As Object, ByVal e As WizardNavigationEventArgs)
 Page.Validate()
 If Page.IsValid() AndAlso ctlCaptcha.IsValid() Then

 ' Some work is done in here              

 End If

 

End Sub

 

Private Sub RegistrationWizard_ActiveStepChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RegistrationWizard.ActiveStepChanged

 If RegistrationWizard.ActiveStepIndex = Registration.Complete Then
                If Not ctlCaptcha.IsValid() Then
                    ' The captcha validation failed. Display the user information step again
                    ctlCaptcha.ErrorMessage = "Try again. Enter the code shown in the box"
                    RegistrationWizard.ActiveStepIndex = Registration.UserInfo
                End If
            End If

End Sub

goforebrokeUser is Offline
New Poster
New Poster
Posts:20

06/29/2010 1:11 PM  

Mitchel,

 

I added e.Cancel = True to cancel the event and prevent the ActiveStepChanged event from firing. However I can't get the captcha control to display the error message. I have the error message defined in the ascx file as well. Any ideas?

 

Thx

Protected Sub OnFinishButtonClick(ByVal sender As Object, ByVal e As WizardNavigationEventArgs)
 Page.Validate()
 If Page.IsValid() AndAlso ctlCaptcha.IsValid() Then

 ' Some work is done in here              

Else

e.cancel = True

ctlCaptchaControl.ErrorMessage = "Please enter the letters shown in the image"

End If

End Sub

goforebrokeUser is Offline
New Poster
New Poster
Posts:20

06/29/2010 3:50 PM  
Hi Mitchel,

Could be that the wizard control be the problem.. I am starting to think its a caching issue with the wizard. Any ideas..

Thank you
Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:6089

06/29/2010 3:51 PM  
It could be, also be sure that you are NOT using ajax on the page

-Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

For shared hosting I recommend PowerDNN

This site is hosted on a Dedicated Server from PowerDNN.com

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
goforebrokeUser is Offline
New Poster
New Poster
Posts:20

06/29/2010 4:04 PM  

Mitchel,

 

I did not know enabling ajax was requirement to use the captcha control. I thought ajax was installed by default for the newer versions of dnn. I did not think I had to run a check as your book suggests in one of the chapters. Do I add a script manager to the page?

 

Thank you

goforebrokeUser is Offline
New Poster
New Poster
Posts:20

06/29/2010 4:11 PM  

Sorry misread your reply... yes I am using ajax in one of the steps.. I will try disabling it and see if it works

 

Thx

goforebrokeUser is Offline
New Poster
New Poster
Posts:20

06/29/2010 4:25 PM  

Mitchel,

 

I am using a popup modal extender in one of the wizard steps...I did not know Ajax and the captcha control did not play well together. Thank you for the info

goforebrokeUser is Offline
New Poster
New Poster
Posts:20

06/29/2010 4:39 PM  
Well I removed the popup modal extender and moved the control out of the wizard and I still have the same problem. I am out of ideas
goforebrokeUser is Offline
New Poster
New Poster
Posts:20

06/29/2010 5:14 PM  
I had one more ajax component in the wizard. I removed it and it worked! Thank you Mitchel your forums and your book are very helpful..Thanks again
You are not authorized to post a reply.
Forums >Development Discussion >DotNetNuke > DNN Captcha Reigstration Wizard



ActiveForums 3.7