Get/set a Profile

  • Thread starter Thread starter PhilTheGap
  • Start date Start date
P

PhilTheGap

Hi there,

I'm looking for a way to get and update the "Profile" of a user. As I'm not
logged as this user, I cannot use the System.Web.Profile class, and after
having a look at MSDN, I don't see any classes among this namespace
(ProfileManager, ProfileInfo...) which could help me.

Best regards
 
Hi Phil,

As for the ASP.NET Profile property, you can manage other users' profile
proiperties as long as you have the username. I assume you're using C#,
here is some sample code which access the profile properties of a specific
user:
protected void Button1_Click(object sender, EventArgs e)
{
ProfileBase userpf = ProfileBase.Create("username");

//get property value
userpf.GetPropertyValue("propertyname");
//set property value
userpf.SetPropertyValue("propertname", Value);

}
<<<<<<<<<<<<<<<<<<<<<<<<<

Also, you can use ProfileManager class to query all the existing profile in
the current asp.nett application:
ProfileInfoCollection pic
=ProfileManager.GetAllProfiles(ProfileAuthenticationOption.All);

foreach (ProfileInfo pi in pic)

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
 
Hi Steven,
Steven Cheng said:
Hi Phil,

As for the ASP.NET Profile property, you can manage other users' profile
proiperties as long as you have the username. I assume you're using C#,
here is some sample code which access the profile properties of a specific
user:
protected void Button1_Click(object sender, EventArgs e)
{
ProfileBase userpf = ProfileBase.Create("username");

//get property value
userpf.GetPropertyValue("propertyname");
//set property value
userpf.SetPropertyValue("propertname", Value);

}
<<<<<<<<<<<<<<<<<<<<<<<<<
Fine.

Thank you
 
Thanks for your reply Phil,

If you have any other questions, welcome to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "PhilTheGap" <[email protected]>
References: <[email protected]>
In-Reply-To: <[email protected]>
Subject: Re: Get/set a Profile
Date: Fri, 6 Jun 2008 16:16:46 +0200
Hi Steven,
"Steven Cheng [MSFT]" <[email protected]> a écrit dans le message
de news:[email protected]...
Hi Phil,

As for the ASP.NET Profile property, you can manage other users' profile
proiperties as long as you have the username. I assume you're using C#,
here is some sample code which access the profile properties of a specific
user:

protected void Button1_Click(object sender, EventArgs e)
{
ProfileBase userpf = ProfileBase.Create("username");

//get property value
userpf.GetPropertyValue("propertyname");
//set property value
userpf.SetPropertyValue("propertname", Value);

}
<<<<<<<<<<<<<<<<<<<<<<<<<
Fine.

Thank you
 
Back
Top