Hello,
I get this error when I try to add a radcaptcha inside the template of a createuserwizard
"Cannot unregister UpdatePanel with ID '' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported"
It seems that captcha is inserting itself automatically in some control collection and create a related updatepanel ?
How to solve this ?
Thank you for help.
CS
PS: seems the updatepanels have no ids ?
I get this error when I try to add a radcaptcha inside the template of a createuserwizard
"Cannot unregister UpdatePanel with ID '' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported"
It seems that captcha is inserting itself automatically in some control collection and create a related updatepanel ?
How to solve this ?
Thank you for help.
CS
PS: seems the updatepanels have no ids ?
6 Answers, 1 is accepted
0
Hello Christian,
Yes, the RadCaptcha control adds an UpdatePanel to its Controls collection, which is used to refresh the image. I tried to reproduce the issue locally by creating a sample project, but to no avail. Here is the source code:
This is a strange issue, and we will need more information to resolve the issue. Please open a new support ticket, and send us simple project that demonstrates the problem, and we will do our best to help.
Kind regards,
Pero
the Telerik team
Yes, the RadCaptcha control adds an UpdatePanel to its Controls collection, which is used to refresh the image. I tried to reproduce the issue locally by creating a sample project, but to no avail. Here is the source code:
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
asp:UpdatePanel
ID
=
"UpdatePanel1"
runat
=
"server"
>
<
ContentTemplate
>
<
asp:CreateUserWizard
ID
=
"CreateUserWizard1"
runat
=
"server"
>
<
WizardSteps
>
<
asp:CreateUserWizardStep
ID
=
"CreateUserWizardStep1"
runat
=
"server"
>
<
ContentTemplate
>
<
table
>
<
tr
>
<
td
align
=
"center"
colspan
=
"2"
>
Sign Up for Your New Account
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
>
<
asp:Label
ID
=
"UserNameLabel"
runat
=
"server"
AssociatedControlID
=
"UserName"
>User Name:</
asp:Label
>
</
td
>
<
td
>
<
asp:TextBox
ID
=
"UserName"
runat
=
"server"
></
asp:TextBox
>
<
asp:RequiredFieldValidator
ID
=
"UserNameRequired"
runat
=
"server"
ControlToValidate
=
"UserName"
ErrorMessage
=
"User Name is required."
ToolTip
=
"User Name is required."
ValidationGroup
=
"CreateUserWizard1"
>*</
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
>
<
asp:Label
ID
=
"PasswordLabel"
runat
=
"server"
AssociatedControlID
=
"Password"
>Password:</
asp:Label
>
</
td
>
<
td
>
<
asp:TextBox
ID
=
"Password"
runat
=
"server"
TextMode
=
"Password"
></
asp:TextBox
>
<
asp:RequiredFieldValidator
ID
=
"PasswordRequired"
runat
=
"server"
ControlToValidate
=
"Password"
ErrorMessage
=
"Password is required."
ToolTip
=
"Password is required."
ValidationGroup
=
"CreateUserWizard1"
>*</
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
>
<
asp:Label
ID
=
"ConfirmPasswordLabel"
runat
=
"server"
AssociatedControlID
=
"ConfirmPassword"
>Confirm Password:</
asp:Label
>
</
td
>
<
td
>
<
asp:TextBox
ID
=
"ConfirmPassword"
runat
=
"server"
TextMode
=
"Password"
></
asp:TextBox
>
<
asp:RequiredFieldValidator
ID
=
"ConfirmPasswordRequired"
runat
=
"server"
ControlToValidate
=
"ConfirmPassword"
ErrorMessage
=
"Confirm Password is required."
ToolTip
=
"Confirm Password is required."
ValidationGroup
=
"CreateUserWizard1"
>*</
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
>
<
asp:Label
ID
=
"EmailLabel"
runat
=
"server"
AssociatedControlID
=
"Email"
>E-mail:</
asp:Label
>
</
td
>
<
td
>
<
asp:TextBox
ID
=
"Email"
runat
=
"server"
></
asp:TextBox
>
<
asp:RequiredFieldValidator
ID
=
"EmailRequired"
runat
=
"server"
ControlToValidate
=
"Email"
ErrorMessage
=
"E-mail is required."
ToolTip
=
"E-mail is required."
ValidationGroup
=
"CreateUserWizard1"
>*</
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
>
<
asp:Label
ID
=
"QuestionLabel"
runat
=
"server"
AssociatedControlID
=
"Question"
>Security Question:</
asp:Label
>
</
td
>
<
td
>
<
asp:TextBox
ID
=
"Question"
runat
=
"server"
></
asp:TextBox
>
<
asp:RequiredFieldValidator
ID
=
"QuestionRequired"
runat
=
"server"
ControlToValidate
=
"Question"
ErrorMessage
=
"Security question is required."
ToolTip
=
"Security question is required."
ValidationGroup
=
"CreateUserWizard1"
>*</
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
>
<
asp:Label
ID
=
"AnswerLabel"
runat
=
"server"
AssociatedControlID
=
"Answer"
>Security Answer:</
asp:Label
>
</
td
>
<
td
>
<
asp:TextBox
ID
=
"Answer"
runat
=
"server"
></
asp:TextBox
>
<
asp:RequiredFieldValidator
ID
=
"AnswerRequired"
runat
=
"server"
ControlToValidate
=
"Answer"
ErrorMessage
=
"Security answer is required."
ToolTip
=
"Security answer is required."
ValidationGroup
=
"CreateUserWizard1"
>*</
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"center"
colspan
=
"2"
>
<
asp:CompareValidator
ID
=
"PasswordCompare"
runat
=
"server"
ControlToCompare
=
"Password"
ControlToValidate
=
"ConfirmPassword"
Display
=
"Dynamic"
ErrorMessage
=
"The Password and Confirmation Password must match."
ValidationGroup
=
"CreateUserWizard1"
></
asp:CompareValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"center"
colspan
=
"2"
style
=
"color: Red;"
>
<
asp:Literal
ID
=
"ErrorMessage"
runat
=
"server"
EnableViewState
=
"False"
></
asp:Literal
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
telerik:RadCaptcha
ID
=
"RadCaptcha1"
runat
=
"server"
ErrorMessage
=
"Invalid Code"
ValidationGroup
=
"CreateUserWizard1"
ForeColor
=
"Red"
EnableRefreshImage
=
"true"
>
</
telerik:RadCaptcha
>
</
td
>
</
tr
>
</
table
>
</
ContentTemplate
>
</
asp:CreateUserWizardStep
>
<
asp:CompleteWizardStep
ID
=
"CompleteWizardStep1"
runat
=
"server"
>
<
ContentTemplate
>
<
table
>
<
tr
>
<
td
align
=
"center"
colspan
=
"2"
>
Complete
</
td
>
</
tr
>
<
tr
>
<
td
>
Your account has been successfully created.
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
colspan
=
"2"
>
<
asp:Button
ID
=
"ContinueButton"
runat
=
"server"
CausesValidation
=
"False"
CommandName
=
"Continue"
Text
=
"Continue"
ValidationGroup
=
"CreateUserWizard1"
/>
</
td
>
</
tr
>
</
table
>
</
ContentTemplate
>
</
asp:CompleteWizardStep
>
</
WizardSteps
>
</
asp:CreateUserWizard
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
</
form
>
</
body
>
</
html
>
This is a strange issue, and we will need more information to resolve the issue. Please open a new support ticket, and send us simple project that demonstrates the problem, and we will do our best to help.
Kind regards,
Pero
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0

CSurieux
Top achievements
Rank 2
answered on 20 Oct 2010, 06:08 PM
Hi Pero,
Thank you for answer.
In fact I am using RadAjaxManager which is in a masterPage common to every page in the site, I can't change ponctually for updatepanel.
And I use templates from code for the various buttons inside each steps.
Creating a sample will be a large work because everything come from such a large framework, I would have appreciated to find an easier way solving this.
Regards
CS
Thank you for answer.
In fact I am using RadAjaxManager which is in a masterPage common to every page in the site, I can't change ponctually for updatepanel.
And I use templates from code for the various buttons inside each steps.
Creating a sample will be a large work because everything come from such a large framework, I would have appreciated to find an easier way solving this.
Regards
CS
0
Hello Christian,
Maybe you could share with us your configuration of the RadAjaxManager? I tried to reproduce the issue by adding an AjaxManager on the page, but with no success. Here is the code:
I also searched our forums and the internet for similar issues, and found the following pages:
Best wishes,
Pero
the Telerik team
Maybe you could share with us your configuration of the RadAjaxManager? I tried to reproduce the issue by adding an AjaxManager on the page, but with no success. Here is the code:
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"Button2"
EventName
=
"Click"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"Panel1"
UpdatePanelRenderMode
=
"Block"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"Panel2"
UpdatePanelRenderMode
=
"Block"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
asp:Panel
ID
=
"Panel1"
runat
=
"server"
>
<
asp:Button
ID
=
"Button2"
runat
=
"server"
Text
=
"Ajax"
/>
</
asp:Panel
>
<
asp:Panel
ID
=
"Panel2"
runat
=
"server"
>
<
telerik:RadCaptcha
ID
=
"RadCaptcha1"
runat
=
"server"
ErrorMessage
=
"Invalid Code"
ValidationGroup
=
"Group"
ForeColor
=
"Red"
EnableRefreshImage
=
"true"
Width
=
"400px"
>
</
telerik:RadCaptcha
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
Text
=
"Validate Code"
ValidationGroup
=
"Group"
/>
</
asp:Panel
>
</
form
>
</
body
>
</
html
>
I also searched our forums and the internet for similar issues, and found the following pages:
- http://www.telerik.com/support/kb/aspnet-ajax/window/cannot-unregister-updatepanel-with-id-updatepanelid-since-it-was-not-registered-with-the-scriptmanager.aspx
- http://stackoverflow.com/questions/238915/what-causes-the-cannot-unregister-updatepanel-error
Best wishes,
Pero
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0

CSurieux
Top achievements
Rank 2
answered on 27 Oct 2010, 03:09 PM
Hello Pero,
Sorry for delay in answedr, here is my code
The teplates are defined incode as
The user control is Pre initialized with
and we get the error in Load
Any help welcome.
CS
Sorry for delay in answedr, here is my code
<%@ Control Language="C#" AutoEventWireup="False" CodeBehind="RegisterCRM.ascx.cs" Inherits="xx.PageModules.Register.RegisterCRM" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions" %>
<
div
class
=
'RegisterMain'
>
<
asp:CreateUserWizard
ID
=
"CreateUserWizard1"
runat
=
"server"
SkinID
=
'CUW'
DisplayCancelButton
=
'true'
DisplaySideBar
=
'false'
>
<
HeaderTemplate
>
<
div
class
=
'RegisterHeader'
>
<
asp:Literal
ID
=
'LitTitle4'
runat
=
'server'
Text
=
"CRM_WIZARD_TITLE "
/><
br
/>
<
asp:Label
ID
=
"HeaderLbl"
runat
=
'server'
/>
</
div
>
</
HeaderTemplate
>
<
WizardSteps
>
<
asp:WizardStep
runat
=
"server"
Title
=
"REGISTERCRM_WIZARD_TITLE"
ID
=
"CreateUserWizardStep2"
StepType
=
'Start'
>
<
div
class
=
'RegisterStep'
>
<
asp:Label
ID
=
"Literal4"
runat
=
"server"
SkinID
=
"RegisterWelcome"
Text
=
"REGISTERCRM_ACCEPT_CONDITIONS"
/><
br
/>
<
asp:HyperLink
ID
=
"ReadConditions"
NavigateUrl
=
"/site/0/ReadConditions.aspx"
runat
=
"server"
Target
=
"_blank"
Text
=
"REGISTERCRM_READ_CONDITIONS"
/>
</
div
>
</
asp:WizardStep
>
<
asp:WizardStep
runat
=
"server"
Title
=
"REGISTERCRM_BILLING"
ID
=
"CreateUserWizardStep3"
StepType
=
"Step"
>
<
table
cellpadding
=
'0'
cellspacing
=
'0'
>
<
tr
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"LBBillingAddress1"
runat
=
"server"
Text
=
"REGISTERCRM_ADDRESS1"
/>
</
td
>
<
td
colspan
=
'2'
class
=
'Register550'
>
<
asp:TextBox
ID
=
"TBBillingAddress1"
runat
=
"server"
Width
=
"500px"
/>
<
asp:RequiredFieldValidator
ID
=
"BillingAddress1Required"
runat
=
"server"
ControlToValidate
=
"TBBillingAddress1"
ErrorMessage
=
"REGISTERCRM_BILLING_ADDRESS_REQ"
ToolTip
=
"REGISTERCRM_BILLING_ADDRESS_REQ"
ValidationGroup
=
"StepValidation"
>*</
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"Label1"
runat
=
"server"
Text
=
"REGISTERCRM_ADDRESS"
/>
</
td
>
<
td
colspan
=
'2'
class
=
'Register550'
>
<
asp:TextBox
ID
=
"TBBillingAddress2"
runat
=
"server"
Width
=
"500px"
/>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"Label2"
runat
=
"server"
Text
=
"REGISTERCRM_ADDRESS3"
/>
</
td
>
<
td
colspan
=
'2'
class
=
'Register550'
>
<
asp:TextBox
ID
=
"TBBillingAddress3"
runat
=
"server"
Width
=
"500px"
/>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"LBBillingCity"
runat
=
"server"
Text
=
"REGISTERCRM_CITY"
/>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"LBBillingCounty"
runat
=
"server"
Text="<%$ Resources:ADNCRM,REGISTERCRM_STATE %>" />
</
td
>
<
td
class
=
'Register400'
>
<
asp:DropDownList
ID
=
"DDLBillingState"
runat
=
"server"
Width
=
"300px"
/>
</
td
>
<
td
class
=
'Register150'
/>
</
tr
>
<
tr
>
<
td
colspan
=
"3"
>
<
asp:ValidationSummary
ID
=
"ValidationSummary0"
runat
=
"server"
CssClass
=
'Error'
ShowSummary
=
"true"
ValidationGroup
=
"StepValidation"
/>
</
td
>
</
tr
>
</
table
>
</
asp:WizardStep
>
<
asp:CreateUserWizardStep
ID
=
"CreateUserWizardStep1"
runat
=
"server"
Title
=
"REGISTERCRM_CREATEUSER"
>
<
ContentTemplate
>
<
table
cellpadding
=
'0'
cellspacing
=
'0'
>
<
tr
id
=
"FirstNameRow"
runat
=
"server"
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"LBFirstName"
runat
=
"server"
Text
=
"REGISTERCRM_FIRSTNAME"
/>
</
td
>
<
td
class
=
'Register400'
>
<
asp:TextBox
ID
=
"TBFirstName"
runat
=
"server"
Width
=
"300px"
/>
</
td
>
<
td
class
=
'Register150'
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"UserNameLabel"
runat
=
"server"
AssociatedControlID
=
"UserName"
Text
=
"REGISTERCRM_USERNAME"
/>
</
td
>
<
td
class
=
'Register400'
>
<
asp:TextBox
ID
=
"UserName"
runat
=
"server"
Width
=
"300px"
/>
</
td
>
<
td
class
=
'Register150'
>
<
asp:RequiredFieldValidator
ID
=
"UserNameRequired"
runat
=
"server"
ControlToValidate
=
"UserName"
CssClass
=
'Error'
ErrorMessage
=
"REGISTERCRM_USERNAME_REQ"
ToolTip
=
"REGISTERCRM_USERNAME_REQ"
ValidationGroup
=
"CreateUserWizardStep1"
>*</
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"LBNickname"
runat
=
"server"
Text
=
"REGISTERCRM_NICKNAME"
/>
</
td
>
<
td
class
=
'Register400'
>
<
asp:TextBox
ID
=
"TBNickname"
runat
=
"server"
Width
=
"300px"
/>
</
td
>
<
td
class
=
'Register150'
>
</
td
>
</
tr
>
<
tr
id
=
'CompanyRow'
runat
=
"server"
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"LBCompany"
runat
=
"server"
Text
=
"REGISTERCRM_COMPANY"
/>
</
td
>
<
td
class
=
'Register400'
>
<
asp:TextBox
ID
=
"TBCompany"
runat
=
"server"
Width
=
"300px"
/>
</
td
>
<
td
class
=
'Register150'
>
</
td
>
</
tr
>
<
tr
id
=
'CompanyRow2'
runat
=
"server"
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"LbSci"
runat
=
"server"
Text
=
"REGISTERCRM_SIC"
/>
</
td
>
<
td
class
=
'Register400'
>
<
asp:TextBox
ID
=
"TBSic"
runat
=
"server"
Width
=
"300px"
/>
</
td
>
<
td
class
=
'Register150'
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"PasswordLabel"
runat
=
"server"
AssociatedControlID
=
"Password"
Text
=
"REGISTERCRM_PWD"
/>
</
td
>
<
td
class
=
'Register400'
>
<
asp:TextBox
ID
=
"Password"
runat
=
"server"
TextMode
=
"Password"
Width
=
"300px"
/>
</
td
>
<
td
class
=
'Register150'
>
<
asp:RequiredFieldValidator
ID
=
"PasswordRequired"
runat
=
"server"
ControlToValidate
=
"Password"
CssClass
=
'Error'
ErrorMessage
=
"REGISTERCRM_PWD1"
ToolTip
=
"REGISTERCRM_PWD1"
ValidationGroup
=
"CreateUserWizardStep1"
>*</
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"ConfirmPasswordLabel"
runat
=
"server"
AssociatedControlID
=
"ConfirmPassword"
Text
=
"REGISTERCRM_PWD2"
/>
</
td
>
<
td
class
=
'Register400'
>
<
asp:TextBox
ID
=
"ConfirmPassword"
runat
=
"server"
TextMode
=
"Password"
Width
=
"300px"
/>
</
td
>
<
td
class
=
'Register150'
>
<
asp:RequiredFieldValidator
ID
=
"ConfirmPasswordRequired"
runat
=
"server"
ControlToValidate
=
"ConfirmPassword"
CssClass
=
'Error'
ErrorMessage
=
"REGISTERCRM_PWD_REQ1"
ValidationGroup
=
"CreateUserWizardStep1"
>*</
asp:RequiredFieldValidator
><
br
/>
<
asp:CompareValidator
ID
=
"PasswordCompare"
runat
=
"server"
ControlToCompare
=
"Password"
CssClass
=
'Error'
ControlToValidate
=
"ConfirmPassword"
Display
=
"Dynamic"
ErrorMessage
=
"REGISTERCRM_ERRPWD1"
ValidationGroup
=
"CreateUserWizardStep1"
/>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"EmailLabel"
runat
=
"server"
AssociatedControlID
=
"Email"
Text
=
"REGISTERCRM_EMAIL"
/>
</
td
>
<
td
class
=
'Register400'
>
<
asp:TextBox
ID
=
"Email"
runat
=
"server"
Width
=
"300px"
/>
</
td
>
<
td
class
=
'Register150'
>
<
asp:RequiredFieldValidator
ID
=
"EmailRequired"
runat
=
"server"
ControlToValidate
=
"Email"
CssClass
=
'Error'
ErrorMessage
=
"REGISTERCRM_EMAIL_REQ"
ValidationGroup
=
"CreateUserWizardStep1"
>*</
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"QuestionLabel"
runat
=
"server"
AssociatedControlID
=
"Question"
Text
=
"REGISTERCRM_QUESTION"
/>
</
td
>
<
td
class
=
'Register400'
>
<
asp:TextBox
ID
=
"Question"
runat
=
"server"
Width
=
"300px"
/>
</
td
>
<
td
class
=
'Register150'
>
<
asp:RequiredFieldValidator
ID
=
"QuestionRequired"
runat
=
"server"
ControlToValidate
=
"Question"
CssClass
=
'Error'
ErrorMessage
=
"REGISTERCRM_QUESTION_REQ"
ValidationGroup
=
"CreateUserWizardStep1"
>*</
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
'Register150'
>
<
asp:Label
ID
=
"AnswerLabel"
runat
=
"server"
AssociatedControlID
=
"Answer"
Text
=
"REGISTERCRM_ANSWER"
/>
</
td
>
<
td
class
=
'Register400'
>
<
asp:TextBox
ID
=
"Answer"
runat
=
"server"
Width
=
"300px"
/>
</
td
>
<
td
class
=
'Register150'
>
<
asp:RequiredFieldValidator
ID
=
"AnswerRequired"
runat
=
"server"
ControlToValidate
=
"Answer"
CssClass
=
'Error'
ErrorMessage="<%$ Resources:ADNCRM,REGISTERCRM_ANSWER_REQ %>" ToolTip="<%$ Resources:ADNCRM,REGISTERCRM_ANSWER_REQ %>"
ValidationGroup="CreateUserWizardStep1">*</
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
colspan
=
'3'
>
<
telerik:RadCaptcha
ID
=
"RadCaptcha1"
runat
=
"server"
ValidationGroup
=
"CreateUserWizardStep1"
ErrorMessage
=
"REGISTERCRM_INVALIDCAPTCHA"
CaptchaTextBoxLabel
=
"CAPTCHA_TEXT"
Display
=
"Dynamic"
EnableRefreshImage
=
"true"
>
<
CaptchaImage
BackgroundNoise
=
'Medium'
EnableCaptchaAudio
=
"true"
LineNoise
=
"Medium"
FontWarp
=
"Medium"
/>
</
telerik:RadCaptcha
>
</
td
>
</
tr
>
<
tr
>
<
td
colspan
=
'3'
align
=
"center"
>
<
asp:CheckBox
ID
=
"CheckBoxSendNewsletter"
Text
=
"REGISTERCRM_SEND_NEWSLETTER"
Checked
=
'True'
runat
=
"server"
/>
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"center"
colspan
=
"3"
class
=
'Error'
>
<
asp:ValidationSummary
ID
=
'VSCreateUserWizardStep1'
CssClass
=
'Error'
runat
=
'server'
ShowSummary
=
'true'
ValidationGroup
=
"CreateUserWizardStep1"
/>
<
asp:Literal
ID
=
"ErrorMessage"
runat
=
"server"
EnableViewState
=
"False"
/>
</
td
>
</
tr
>
</
table
>
</
ContentTemplate
>
</
asp:CreateUserWizardStep
>
<
asp:CompleteWizardStep
ID
=
"CompleteWizardStep1"
runat
=
"server"
Title
=
"REGISTERCRM_END"
>
<
ContentTemplate
>
<
table
border
=
"0"
cellpadding
=
"0"
cellspacing
=
"0"
>
<
tr
>
<
td
align
=
"center"
>
<
asp:Literal
ID
=
'wizend'
Text
=
"REGISTERCRM_END"
runat
=
'server'
/>
</
td
>
</
tr
>
<
tr
>
<
td
align
=
'center'
>
<
asp:Literal
ID
=
'Literal1'
Text
=
"REGISTERCRM_ACCOUNTCREATED"
runat
=
'server'
/>
<
asp:Label
ID
=
"CompleteLbl"
runat
=
'server'
/><
br
/>
<
asp:HyperLink
ID
=
"EditProfileLinkSuccess"
NavigateUrl
=
"~/secure2/editprofile.aspx"
runat
=
"server"
Text
=
"LOGIN_CHANGE_EDIT_PROFILE"
/>
</
td
>
</
tr
>
</
table
>
</
ContentTemplate
>
</
asp:CompleteWizardStep
>
</
WizardSteps
>
</
asp:CreateUserWizard
>
</
div
>
The teplates are defined incode as
internal class StepNavigationTemplate : ITemplate
{
CreateUserWizard _owner = null;
public StepNavigationTemplate(CreateUserWizard owner)
{
_owner = owner;
}
void ITemplate.InstantiateIn(Control ctl)
{
string ext = Helpers.LocalizeHelper.GetCurrentNeutralCultureName();
Table tb = new Table();
tb.CellPadding = 0;
tb.CellSpacing = 2;
TableRow rw = new TableRow();
rw.HorizontalAlign = HorizontalAlign.Center;
TableCell c = new TableCell();
ImageButton cancelBtn = new ImageButton();
cancelBtn.ID = "StepCancelButton";
cancelBtn.CommandName = "Cancel";
cancelBtn.SkinID = "cancel_"+ext;
cancelBtn.CausesValidation = false;
cancelBtn.AlternateText = LocalizeHelper.Localize("CANCEL","cancelBtn");
c.Controls.Add(cancelBtn);
rw.Cells.Add(c);
c = new TableCell();
ImageButton prevBtn = new ImageButton();
prevBtn.ID = "StepPreviousButton";
prevBtn.CommandName = "MovePrevious";
prevBtn.SkinID = "adn_previous_" + ext;
prevBtn.CausesValidation= false;
prevBtn.AlternateText = LocalizeHelper.Localize("REGISTERCRM_WIZARD_PREV","Next");
c.Controls.Add(prevBtn);
rw.Cells.Add(c);
c = new TableCell();
ImageButton nextBtn = new ImageButton();
nextBtn.ID = "StepNextButton";
nextBtn.CommandName = "MoveNext";
nextBtn.SkinID = "setupnext_" + ext;
nextBtn.CausesValidation= true;
nextBtn.ValidationGroup = "StepValidation";
nextBtn.AlternateText = LocalizeHelper.Localize("REGISTERCRM_WIZARD_STARTNEXT","Next");
c.Controls.Add(nextBtn);
rw.Cells.Add(c);
tb.Rows.Add(rw);
ctl.Controls.Add(tb);
}
}
The user control is Pre initialized with
public override void Page_PreInit(object sender, EventArgs e)
{
string ext = Helpers.LocalizeHelper.GetCurrentNeutralCultureName();
BtnResetShipping.SkinID = "Reset_" + ext;
CreateUserWizard1.StartNavigationTemplate = new StartNavigationTemplate(CreateUserWizard1);
CreateUserWizard1.StepNavigationTemplate = new StepNavigationTemplate(CreateUserWizard1);
CreateUserWizard1.CreateUserStep.CustomNavigationTemplate = new CustomNavigationTemplate(CreateUserWizard1);
CreateUserWizard1.CompleteStep.CustomNavigationTemplate = new CompleteNavigationTemplate(CreateUserWizard1);
}
and we get the error in Load
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
RadCaptcha CaptchaControl1 = (RadCaptcha)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("RadCaptcha1");
if ( CaptchaControl1 != null )
CaptchaControl1.CaptchaTextBoxLabel = LocalizeHelper.Localize("CAPTCHA_TEXT", "Enter the code shown");
}
}
Any help welcome.
CS
0

CSurieux
Top achievements
Rank 2
answered on 01 Nov 2010, 01:12 PM
Hello Pero,
I finally found the solution.
The problem was raise when in the OnInit method, my code was assigning a new value to the MembershipProvider
CreateUserWizard1.MembershipProvider = MyProviderClassName;
The alternate effect of this assignment was to set the wizard ChildControlsCreated flag to false.
So the next access to EnsureChilControls deleted existing WizarSetps to recreate them.
It appears that RadCaptcha does not support this, exception message was that some updatepanel has not been registered in ScriptManager and it can't ne deleted, as I have ajaxified the full wizard with ajaxmanager, this message seems not relevant.
It looks like a bug.
Regards
CS
I finally found the solution.
The problem was raise when in the OnInit method, my code was assigning a new value to the MembershipProvider
CreateUserWizard1.MembershipProvider = MyProviderClassName;
The alternate effect of this assignment was to set the wizard ChildControlsCreated flag to false.
So the next access to EnsureChilControls deleted existing WizarSetps to recreate them.
It appears that RadCaptcha does not support this, exception message was that some updatepanel has not been registered in ScriptManager and it can't ne deleted, as I have ajaxified the full wizard with ajaxmanager, this message seems not relevant.
It looks like a bug.
Regards
CS
0
Hello Christian,
Could you please test if you get the same behavior when replacing the RadCaptcha control with UpdatePanel? I want to make sure if this is related to our control(s), or it is expected behavior of the ASP.NET Ajax framework.
So,
In the mean time I will try to find a solution to your problem.
Regards,
Pero
the Telerik team
Could you please test if you get the same behavior when replacing the RadCaptcha control with UpdatePanel? I want to make sure if this is related to our control(s), or it is expected behavior of the ASP.NET Ajax framework.
So,
- Remove the RadCaptcha control
- Place an UpdatePanel in the same CreateUserWizard step
In the mean time I will try to find a solution to your problem.
Regards,
Pero
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items