read user profile by username

657 Views Asked by At

I need to retrieve from the profile of some user (which is not the one is currently logged-in) by using the username

for example

<properties>
    <add name="StartedOn"/>
    <add name="FullName"/>
    <add name="Email"/>
    <add name="Phone"/>
</properties>

and I want to retrieve the FullName for other user than the currently logged one by using username for the desired one so what should i do

2

There are 2 best solutions below

0
On BEST ANSWER
foreach (string name in q)
{
     ProfileBase pb = ProfileBase.Create(name);
     string s = pb.GetPropertyValue("Fullname").ToString();
}

where q is query result using Linq

0
On

You must be using web application as you can access this directly by Profile.Fullname. See http://weblogs.asp.net/anasghanem/archive/2008/04/12/the-differences-in-profile-between-web-application-projects-wap-and-website.aspx