Hello!
I have been struggling with this for a while now, and i realized that i'm stuck.
What i'm trying to acheive is to get all the profile properties for a user profile in
one sweep. The property names are set in web.config, e.g. FirstName, LastName, ZipCode.
I know that i can get the values for this in this way:
I don't want to code in "FirstName" etc, in case i update the profile properties at a later stage.
Is thera a way to somehow iterate through all properties and get the values without hardcoding the property names in the code?
bib2006
0 Points
9 Posts
Get all profile property values?
Mar 03, 2011 06:08 AM|LINK
Hello!
I have been struggling with this for a while now, and i realized that i'm stuck.
What i'm trying to acheive is to get all the profile properties for a user profile in
one sweep. The property names are set in web.config, e.g. FirstName, LastName, ZipCode.
I know that i can get the values for this in this way:
I don't want to code in "FirstName" etc, in case i update the profile properties at a later stage.
Is thera a way to somehow iterate through all properties and get the values without hardcoding the property names in the code?
Thanks in advance!
sansan
All-Star
53942 Points
8147 Posts
Re: Get all profile property values?
Mar 03, 2011 05:07 PM|LINK
You can use Reflection to get all properties
bkuhn
Member
16 Points
11 Posts
Re: Get all profile property values?
Jun 28, 2012 04:48 PM|LINK
Thank you Sansan! That was exactly what I needed!