Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Create an empty Profile for the newly created user
- ProfileCommon p = (ProfileCommon)ProfileCommon.Create(CreateUserWizard1.UserName, true);
- // Populate some Profile properties off of the create user wizard
- p.CurrentLevel = Int32.Parse(((DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("clevel")).SelectedValue);
- // Save profile - must be done since we explicitly created it
- p.Save();
- public void UpdateCurrentLvl_OnDeactivate(object sender, EventArgs e)
- {
- int level = Int32.Parse(((DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("clevel")).SelectedValue);
- MyMembershipUser myUser = (MyMembershipUser)Membership.GetUser(CreateUserWizard1.UserName);
- myUser.CurrentLVL = level;
- Membership.UpdateUser(myUser);
- }
Add Comment
Please, Sign In to add comment