c# - ComboBox ListItem Help -
i have code here, trying output contents of combobox, label. error cannot convert char system.web.ui.webcontrols.listitem
foreach (listitem mine in listsitesdropdownbox.items) { mylabel.text += mine.value.tostring() + " " + mine.tostring() + "<br>"; } how suggest go doing can output value , name of list item?
thanks
you want text property of mine in second part.
foreach (listitem mine in listsitesdropdownbox.items) { mylabel.text += mine.value + " " + mine.text + "<br>"; } here's msdn reference listitem. tostring unnecessary value string.
Comments
Post a Comment