0

Lets say that I have a database containing the following:

 ID      CategoryName  

  1      CategoryName1
  2      CategoryName2
  3      CategoryName3
  4      CategoryName4
  5      CategoryName5
  6      CategoryName6
  7      CategoryName7
  8      CategoryName8
  9      CategoryName9

I retrieve the ID & CategoryName from the database and put the CategoryName list in a ComboBox , I take the name of Category from ComboBox and i have to get the right ID for the selected CategoryName.

I think about retrieve the data in a List with key and value

sticky bit
  • 36,626
  • 12
  • 31
  • 42
Ameer Haitham
  • 43
  • 1
  • 7

1 Answers1

0

Use Dictionary for this, Easy to Display Key and Value Pair

logeshpalani31
  • 1,416
  • 12
  • 33