C#:Using Dictionary as DropDownList Data Source
Posted by malakablog on March 31, 2009
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();
This entry was posted on March 31, 2009 at 4:11 pm and is filed under Uncategorized. Tagged: application, beginner, C#, code, Collection, Datatabe, development, Dictionary, dropdown, DropDownList, IDictionary, JavaScript, list, Programming, VS2005. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.






