Hi, I have a small problem.
I have 2 listboxes (ListBox1 & ListBox2)
In ListBox I have added items from DB (table -> teachers -> Name,ForeName, teachersID).
The table is related to table-Test (testID, teachersID, testName)
add items to ListBox1
foreach (var i in teachers)
{
lLstBox1.Items.Add(string.Format("{0} \t{1}", i.foreName, i.name));
}
everything works good, until these codelines.
So I added to ListBox1
ListBox1_SelectedIndexChanged
How I can get selected teacherID, if in ListBox1 is only Name & Forename?
I need get teachersID to fill ListBox2 items, where TeachersID is a variable.
private void listBoxSkolotaji_SelectedIndexChanged(object sender, EventArgs e)
{
foreach(
{
ListBox2.Items.add(
}
I hope you get the problem, that I need to get solved! :)
Thanks