CreateUserWizard issue

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top