getting UserId of newly created user by CreateUserWizard

A

Adam Right

Hi All,

I can find UserId of an Authenticated user over the ProviderUserKey of
MembershipUser , like that:

if(Page.User.Identity.IsAuthenticated)
{
MembershipUser usr = Membership.GetUser(Page.User.Identity.Name);
Label1.text = usr.ProviderUserKey.ToString();
}

But, is it possible to get the UserId of just created user in CreatedUser
event of CreateUserWizard ?

I need UserID to insert some extra information not supported by
CreateUserWizard and i have to insert them in CreatedUser event...

Any idea ?

Thanks....

Adam
 
J

JayKarpinsky

Adam,

Did you ever figure this out?

Keith

"Adam Right" <AdamRight> wrote in message










- Show quoted text -

Here's an example:

Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
CreateUserWizard.CreatedUser

Dim User As MembershipUser =
Membership.GetUser(CreateUserWizard.UserName)

Dim UserGUID As Guid = CType(User.ProviderUserKey, Guid)

End Sub
 

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