开发者

read user profile by username

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 th开发者_JS百科e desired one so what should i do


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

where q is query result using Linq


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜