Issue with Profile Properties

G

Guest

I am using a custom sql profile provider.

I need to loop through the Profile properties and get their names and
values. The Profile.PropertyValues collection at most times has a Count of
0. Very rarely it has the right count. I am able to access the property with
Profile.GroupName.PropertyName irrespective of whethe the
Profile.PropertyValues is loaded or not. The Profile.Properties collection is
populated. When does the Profile.PropertyValues collection get populated? Am
I doing something wrong? Or how else can I loop through the properties?

foreach (SettingsPropertyValue p in Profile.PropertyValues)
{
Response.Write(Profile.PropertyValues[p.Name].PropertyValue);
}

Thanks,
Kumar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top