Using Asp.net Members and Profile Providers:
Is it possible to get a user profile using UserID UserID instead of username?
The reason I'm asking is because if I have a UserID and not because of the username, I will have to write the following two lines of code
Dim MembershipUser As MembershipUser = Membership.GetUser("UserID")
Dim Profile As Profile = Profile.GetProfile(MembershipUser.UserName)
Instead:
Dim Profile As Profile = Profile.GetProfile ("UserID")
Will it affect performance? Is my design bad? Am I missing something?
Please note: I know that I can get the current user on the system using the following code: HttpContext.Current.User.Identity.Name
Haris source
share