I have IDictionary Object called ListOptions. To use it as the data source for an ASP.NET DropDownList called objDropDownList:
objDropDownList.DataSource = ListOptions;
objDropDownList.DataTextField = “Value”;
objDropDownList.DataValueField = “Key”;
objDropDownList.DataBind();
Advertisements