473,387 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Get/set a Profile

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

Jun 27 '08 #1
5 1743
On Jun 5, 5:45 pm, "PhilTheGap" <ori...@noemail.noemailwrote:
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
Look here: http://www.groupsrv.com/dotnet/post-642341.html

Mykola
http://marss.co.ua
Jun 27 '08 #2
You can just write into aspnet_Profile table of the ASP.NET data store.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"PhilTheGap" <or****@noemail.noemailwrote in message
news:B8**********************************@microsof t.com...
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

Jun 27 '08 #3
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(ProfileAuthenticati onOption.All);

foreach (ProfileInfo pi in pic)
Response.Write("<br/>" + pi.UserName);
>>>>>>>>>>>>>>>
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:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.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/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "PhilTheGap" <or****@noemail.noemail>
Subject: Get/set a Profile
Date: Thu, 5 Jun 2008 16:45:00 +0200
>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

Jun 27 '08 #4
Hi Steven,
"Steven Cheng [MSFT]" <st*****@online.microsoft.coma écrit dans le message
de news:Nw**************@TK2MSFTNGHUB02.phx.gbl...
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

Jun 27 '08 #5
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:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "PhilTheGap" <or****@noemail.noemail>
References: <B8**********************************@microsoft.co m>
<Nw**************@TK2MSFTNGHUB02.phx.gbl>
>In-Reply-To: <Nw**************@TK2MSFTNGHUB02.phx.gbl>
Subject: Re: Get/set a Profile
Date: Fri, 6 Jun 2008 16:16:46 +0200
>
Hi Steven,
"Steven Cheng [MSFT]" <st*****@online.microsoft.coma écrit dans le
message
>de news:Nw**************@TK2MSFTNGHUB02.phx.gbl...
>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

Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Shimon Sim | last post by:
Hi I am working on application that need to hold custom user information - Last and first name, email, some other domain related information. I used to create Base class for all my pages. The base...
0
by: Giorgio | last post by:
It seems that the ASP.NET Microsoft team didn't think about this!! The profilemanager class has the following methods: - DeleteInactiveProfiles. Enables you to delete all profiles older...
4
by: Marco Assandri | last post by:
Hi everybody, I have a problem with this code. 'An anonymous username copied from the Username column of Aspnet_Users table with IsAnonymous = True dim SurelyAnonymousUsername =...
6
by: Jeff | last post by:
Hey (and thank you for reading my post) In visual web developer 2005 express edition I've created a simple website project.. At this website I want users who register to be able to upload a...
9
by: Kirk | last post by:
I have successfully, implemented a custom Membership Provider to a SQL 2000 table, however, I am having problems doing the same with a Profile Provider. As I understand it, the steps for both of...
3
by: shapper | last post by:
Hello, In my Page's VB.NET code I am changing the value of the Profile property NAME. Profile.Name = tbName.Text However, I need to change this property value from a class in my App_Code...
4
by: Scott M. | last post by:
When profile data is stored in ASP .NET, where is the user data persisted? For how long is it persisted: is it session persisted or permanent (like a cookie)?
3
by: Oriane | last post by:
Hi there, I would like to open my Asp.Net project as a "Web Application" rather than as a "Web Site" in Visual Studio. But the thing is that I use the System.Web.Profile and the auto-generated...
1
by: shapper | last post by:
Hello, I am using a custom Profile provider as follows: public class Profile : ProfileBase { public Bio Bio { get; set; }
0
by: David Troxell - Encourager Software | last post by:
Product Scope 7 (http://www.encouragersoftware.com/) and Profile Exchanges enhanced with SetupCast publishing methods NOTE: If you are a software author, releasing commercial and/or shareware...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.