Apr2Written by:slhilbert
4/2/2009 3:00 PM 
Today I needed to grab the values of a list I have setup in Dotnetnuke
and display it in a dropdownlist. The code to do this is really quite
simple.
'List controller grants us access to the function that we can use to get the list.
Dim lc As New DotNetNuke.Common.Lists.ListController()
'Databinding a list called, "Country" to the dropdownlist.
Me.ddlCountry.DataSource = lc.GetListEntryInfoCollection("Country")
Me.ddlCountry.DataTextField = "Text"
Me.ddlCountry.DataValueField = "Value"
Me.ddlCountry.DataBind()
Me.ddlCountry.Items.Insert(0, "-Select a Country-")
Tags: