Im iterating a list and getting hold of 2 fields “Name” and “Url”
i want to extract these fields and use them to create a datasource
I want to databind these to a dropdownList
DropDownList.DataTextField = "Name";
DropDownList.DataValueField = "Url";
how can I create a datasource based on this list?
then do the above, then databind.
Assuming that you have an list item named MyListItem and MyListItem has two properties Name and Url, you can bind a list of MyListItem like that :