Welcome to AspAdvice Sign in | Join | Help

Learning .NET

This is a blog about my summer internship at Lake Quincy Media in Kent, Ohio. I am a Senior in Computer Science at Kent State University.

Syndication

Tags

    No tags have been created or used yet.

Navigation

ASP.NET Membership API: Getting the UserId of a user

I got this from Andreas Kraus's Blog; I needed to know how to access the UserId of a user in the ASP.NET Membership API; this turned out to work and be very handy:

“If you use the new comfortable Login Controls of ASP.NET v2, here is how you resolve the UserID of the currently logged in user:

        MembershipUser myObject = Membership.GetUser();
string UserID = myObject.ProviderUserKey.ToString();"

That’s all! Hope that helps..

 

-zach

Published Tuesday, July 25, 2006 3:04 PM by Zbussing

Comments

No Comments

Anonymous comments are disabled