0

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

Muhammad Nour
  • 2,109
  • 2
  • 17
  • 24
  • I can't find anything more specific than few links: http://odetocode.com/Articles/440.aspx http://stackoverflow.com/questions/6144137/how-to-query-from-asp-net-profile-properties-using-linq check this one as well: http://stackoverflow.com/questions/1019725/asp-net-roles-and-profiles-best-way-to-query-for-collection-of-users-who-match-c – Davide Piras Sep 17 '11 at 11:54

2 Answers2

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

where q is query result using Linq

Muhammad Nour
  • 2,109
  • 2
  • 17
  • 24
0

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

Junaid
  • 1,708
  • 16
  • 25