key-value pair to drop downlist

  • Thread starter Thread starter Tom Gao
  • Start date Start date
T

Tom Gao

hi guys

I'm wondering how do I pass a key-value pair to a drop downlist ?
since I can not use hashtable as there is nor order.. and I can not use
sortedlist as the order which I supply to the dropdownlist may not be
sorted.

how can I do this ?

Thanks
Tom
 
Tom said:
hi guys

I'm wondering how do I pass a key-value pair to a drop downlist ?
since I can not use hashtable as there is nor order.. and I can not
use sortedlist as the order which I supply to the dropdownlist may
not be sorted.

how can I do this ?

Thanks
Tom

Is this winform or webform?

For webform you add a ListItem to the Items collection.

For a winform application you don't (as in asp.net) provide key-value pairs,
but you supply a list of objects. The ToString() method on those objects
gives the value to display.

Hans Kesting
 
thanks :D
Hans Kesting said:
Is this winform or webform?

For webform you add a ListItem to the Items collection.

For a winform application you don't (as in asp.net) provide key-value pairs,
but you supply a list of objects. The ToString() method on those objects
gives the value to display.

Hans Kesting
 
Back
Top