How can a user view profile info of other users?
- by Arvind Singh
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?