I have a combo box that was populated using a data source (value and id)
comboBox_Degree.DataSource = ds.Tables["Field"];`
comboBox_Degree.DisplayMember = "Field_Degree";
comboBox_Degree.ValueMember = "Field_ID";
Now I want to restore the identifier when the SelectedIndexChanged event has occurred. but when I passed it to int, I got such an error.
int fid = Convert.ToInt32(comboBox_Degree.SelectedValue.ToString());
Mistake:
The input string was not in the correct format.
How can I apply this value to the whole?
user2944170
source
share