Hi,
I populate a dropdown from a recordset of names. I need for the NAME to display but the value to be another column called PERNO. Here's how I populate it.
ds = new SqlDataAdapter("select distinct name from empmast order by name", con); ds.Fill(dt); for (int i = 0; i < dt.Rows.Count; i++) { cbOfficer.Items.Add(dt.Rows[i]["name"]); }
I'm guessing I need to query PERNO as well, but how I set it to be the actual value of what is selected?
Is it the ValueMember attribute?