I can get a user by using their username like so:
Dim user = Membership.GetUser("myUserName")
How can I get a user using their UserKey?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
Membership.GetUsermethod has an overload which takes a user key (as object).http://msdn.microsoft.com/en-us/library/ms152019.aspx
As long as the key that you pass in is not a string or boolean, it should use that overload.