Membership.GetAllUsers () returns a membership in a membership, which you can use to access an individual member. Example:
MembershipUserCollection users = Membership.GetAllUsers(); string email = users["some_username"].Email;
You can also get ProfileInfo in the same way:
ProfileInfoCollection profiles = ProfileManager.GetAllProfiles(ProfileAuthenticationOption.All); DateTime lastActivity = profiles["some_username"].LastActivityDate;
However, by default there are no FirstName and LastName properties unless you manually specified them in your profile provider.
Check out the MembershipUser class and ProfileInfo class. More details. You can also check the SqlProfileProvider class as an example of a profile provider if you have not already implemented it.
source share