Convert Membership GUID to User Information

Here is an example of converting Membership userid to First Name and Last Name on Membership Profile. The way you will call this function ...
Response.write(convertGuidtoName(Guid "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"));
public string convertGuidtoName(Guid g)
    {
        MembershipUser user = Membership.GetUser(g) ; //
        string name = user.UserName; // get username from membership
 
        ProfileCommon userProfile = (ProfileCommon)
        ProfileCommon.Create(name, true);
        string x = string.Concat(userProfile.FirstName, " ", userProfile.LastName);
        return x;
    }
FacebookTwitterGoogle+Share