View Single Post
  #1 (permalink)  
Old January 30th, 2016, 04:54 PM
Grodnik Grodnik is offline
Authorized User
Points: 91, Level: 1
Points: 91, Level: 1 Points: 91, Level: 1 Points: 91, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2015
Location: rural Minnesota
Posts: 19
Thanks: 6
Thanked 0 Times in 0 Posts
Default CreateUserWizard - UserCreated Event

The background: I need to get the UserName to create an application table with UserName as a column.
I have created a wizard step to get 2 application text fields. When I click the Finish button on that step, I execute a wzCreateUser_FinishButtonClick subroutine. The first line is
Code:
Dim TheUser As String = User.Identity.Name
, and TheUser is available and I can then proceed to create the application table.
My Question: There is a CreatedUser event that nominally 'occurs after the membership provider has created a new Web Site user account'. However, when I code
Code:
Dim TheUser As String = User.Identity.Name
in
Code:
 Protected Sub wzCreateUser_CreatedUser(sender As Object, e As EventArgs) Handles wzCreateUser.CreatedUser
, TheUser is empty. Why? If the username has been created, where do I find it? I am finding this wizard to be a bit mysterious.
Thank you.
Reply With Quote