I'm using a CreateUserWizar d with an extra WizardStep. My code is based on
this http://msdn2.microsoft.com/en-us/library/ms178342.aspx code.
When the method "protected void CreateUserWizar d1_CreatedUser( ...)" executes,
using the debugger I can see all entered values (CreateUserWiza rd1.Password,
CreateUserWizar d1.Email EXCEPT CreateUserWizar d1.UserName is "",
however this UserName was of course entered. I don't know what happens. Find
hereafter the code snippet for this method:
protected void CreateUserWizar d1_CreatedUser( object sender, EventArgs e)
{
// Determine the checkbox values.
CheckBox subscribeCheckB ox =
(CheckBox)Creat eUserWizard1.Cr eateUserStep.Co ntentTemplateCo ntainer.FindCon trol("Subscribe CheckBox");
CheckBox shareInfoCheckB ox =
(CheckBox)Creat eUserWizard1.Cr eateUserStep.Co ntentTemplateCo ntainer.FindCon trol("ShareInfo CheckBox");
// The following line doesn't give the entered UserName value,
// however this was correct entered!
MembershipUser user = Membership.GetU ser(CreateUserW izard1.UserName );
user.Comment = "Subscribe= " + subscribeCheckB ox.Checked.ToSt ring() +
"&" +
"ShareInfo= " + shareInfoCheckB ox.Checked.ToSt ring();
Membership.Upda teUser(user);
// Show or hide the labels based on the checkbox values.
Label subscribeLabel =
(Label)CreateUs erWizard1.Compl eteStep.Content TemplateContain er.FindControl( "SubscribeLabel ");
Label shareInfoLabel =
(Label)CreateUs erWizard1.Compl eteStep.Content TemplateContain er.FindControl( "ShareInfoLabel ");
subscribeLabel. Visible = subscribeCheckB ox.Checked;
shareInfoLabel. Visible = shareInfoCheckB ox.Checked;
}
Anyone suggestions what goes wrong here, i'm completely lost on this.
Thanks