I have a Dictionary<String,Person>
, where Person is a class, defined below
String role;
public class Person
{
public string firstname{ get; set; }
public string lastname{ get; set; }
public string city{ get; set; }
}
My question is how to bind the Dictionary key: String with a ComboBox, meanwhile. have the Dictionary value: Person connected with three textboxes. That is, once a key is selected in the ComboBox, the corresponding value, firstname, lastname, city are shown in the three textboxes respectively?
Thanks in advance!