Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

getting UserId of newly created user by CreateUserWizard

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Adam Right - 23 Feb 2008 15:04 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.