Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesAccessing a Profile Custom Pick ListAccessing a Profile Custom Pick List
Previous
 
Next
New Post
11/2/2010 7:56 AM
 
Hi,

I've added an item to my user profile properties - it's a drop-down list which can be set to one of several values.

I can access a profile property as follows:

UserInfo.Profile.GetPropertyValue("MyPropertyName");

What I want to do is retrieve all the values that the list can be set to so that, ideally, I can display the drop-down list to my user allowing them to set the property value from my module. 

Can anyone help?

Thanks!
 
New Post
11/2/2010 8:33 AM
 
Darrin

You should use DotNetNuke.Common.Lists.ListController There is a special method GetListEntryInfoCollection(string) to get collection of ListEntryInfo's by the name of the List. Name of the list if the name of the property you use in the profile.

Hope this helps.

Sergey
 
New Post
11/2/2010 9:09 AM
 
Thanks for the fast reply Sergey, that worked just great! I must have had a mental block when I was looking at this earlier because I was sure I'd looked at using the ListController. Anyway, here it is:

ListController lc = new ListController();
ListEntryInfoCollection leic = lc.GetListEntryInfoCollection("MyList");
ddlMyList.DataTextField = "Text";
ddlMyList.DataValueField = "Value";
ddlMyList.DataSource = leic;
ddlMyList.DataBind();
 
New Post
11/2/2010 9:12 AM
 
Darrin

You are welcome!

Sergey
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesAccessing a Profile Custom Pick ListAccessing a Profile Custom Pick List


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out