I have a user control which has a ComboBox and a SelectedIndexChanged event handler. In the event handler, I need to be able to tell what was the previously selected index... can anyone point me in the right direction?
private void cboTargetMode_SelectedIndexChanged(object sender, EventArgs e)
{
// need to get the previously selected index and do some handling here...
// ... some handler code here ...
switch (cboTargetMode.SelectedIndex)
{
case 1: // ..... some code here...
break;
case 2: // ..... some code here...
break;
case 3: // ..... some code here...
break;
default: // ..... some code here...
break;
}
}