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
Keith G Hicks - 01 Mar 2008 20:33 GMT
Adam,
Did you ever figure this out?
Keith
> Hi All,
>
[quoted text clipped - 18 lines]
>
> Adam
JayKarpinsky@gmail.com - 06 Mar 2008 04:07 GMT
> Adam,
>
[quoted text clipped - 26 lines]
>
> - 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