I'm fiddling with the User.Profile because I think it would work well to store custom profile data for the users. For example, let's say your implementation requires that you store the customer's age ... I'd like to create a helper class to allow the application to add an age property to the User.Profile for use in the registration (and or profile display) screens (as well as data mining).
That leads to my question:
When is the User.Profile object instantiated? Or is it currently in use?
When I try to play with the Personalization.Profile.SetPropertyValues method on the User.Profile object I receive a null pointer exception. It looks like the Profile object is not initialized, and there is no setter for the Profile (just a getter) so I can't instantiate one myself.
Any thoughts?
Thanks,
Mike
User Profile Question
- Logan Rhodehamel
- Developer
- Posts: 4116
- Joined: Wed Dec 10, 2003 5:26 pm
Re: User Profile Question
It's not used. I think it might even be disabled in our default web.config.
There is a custom field collection for user that you could use. Try User.Settings.SetValueByKey and User.Settings.GetValueByKey. The only restriction is you cannot have multiple fields with the same key.
There is a custom field collection for user that you could use. Try User.Settings.SetValueByKey and User.Settings.GetValueByKey. The only restriction is you cannot have multiple fields with the same key.
Cheers,
Logan
.com
If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
Logan

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
Re: User Profile Question
That did the trick. Thanks!
Mike
Mike