How can a user view profile info of other users?

Posted by Arvind Singh on Stack Overflow See other posts from Stack Overflow or by Arvind Singh
Published on 2010-03-19T17:10:44Z Indexed on 2010/03/19 19:51 UTC
Read the original article Hit count: 383

Filed under:
|

I have stored profile info using this code

        ProfileBase userprofile = HttpContext.Current.Profile;
        userprofile.SetPropertyValue("FirstName", TextBoxFirstName.Text);
        userprofile.SetPropertyValue("LastName", TextBoxLastName.Text);
        userprofile.SetPropertyValue("AboutMe", TextBoxAboutMe.Text);
        userprofile.SetPropertyValue("ContactNo", TextBoxContactNo.Text);

and in web.config

<profile enabled="true"  defaultProvider="AspNetSqlProfileProvider">
  <properties>
    <add name="FirstName" type="String"  />
    <add name="LastName" type="String" />
    <add name="AboutMe" type="String" />
    <add name="ContactNo" type="String" />

  </properties>
</profile>

The profile info is stored and every user is able to view his own profile info using something like this

TextBoxFirstName.Text = HttpContext.Current.Profile.GetPropertyValue("FirstName").ToString();

How to fetch profile info of other user say a user types the username of other user in a text box and clicks a button?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about profile