L
LRuss
I’ve customized the CreateUserWizard by adding Steps and customizing the
Create User Step. I find that if I programmatically assign a value to either
the default UserName or Email
Textbox Text property, say on the ActiveStepChanged event or the
NextButtonClick, when the Complete step transitions to the Continue
destination it fails to automatically login the user (i.e. my LoginView and
LoginStatus controls remain in their Anonymous state).
My Wizard’s LoginCreatedUser property is True. The user is successfully
registered in the database.
I’ve found that adding the following fixes the problem
protected void CreateUserWizard1_ContinueButtonClick(object sender,
EventArgs e)
{
TextBox UserName =
(TextBox)CreateUserAcct.ContentTemplateContainer.FindControl("UserName");
FormsAuthentication.RedirectFromLoginPage(UserName.Text, false);
}
If I remove the code assigning the values to the UserName and/or Email
textboxes (on the CreateUserStep), the user is properly logged in on the
transition.
Any ideas?
Create User Step. I find that if I programmatically assign a value to either
the default UserName or Email
Textbox Text property, say on the ActiveStepChanged event or the
NextButtonClick, when the Complete step transitions to the Continue
destination it fails to automatically login the user (i.e. my LoginView and
LoginStatus controls remain in their Anonymous state).
My Wizard’s LoginCreatedUser property is True. The user is successfully
registered in the database.
I’ve found that adding the following fixes the problem
protected void CreateUserWizard1_ContinueButtonClick(object sender,
EventArgs e)
{
TextBox UserName =
(TextBox)CreateUserAcct.ContentTemplateContainer.FindControl("UserName");
FormsAuthentication.RedirectFromLoginPage(UserName.Text, false);
}
If I remove the code assigning the values to the UserName and/or Email
textboxes (on the CreateUserStep), the user is properly logged in on the
transition.
Any ideas?