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

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -