i'm writing a C# app using winforms. I have a listbox. I get my data from xml file, user name and their id's. I want names to be shown in the listbox and when I select one of them, I want to get his/her id using selectedValue property. However I cannot do this. I tried keyValuePair which shows "[username, id]" in the listbox which is not good (see code below). How can I simulate html select in c# in short? I want names to be shown in the listbox but want to get id's in the backend. Thanks...
LB_UserList.Items.Add(new KeyValuePair<string, string>(full_name, node["user_id"].InnerText));