private void thanabox_SelectedIndexChanged(object sender, EventArgs e) { Union u = new Union(); Thana t = new Thana(); District d = new District (); try { thana_no.Text = t.getThanaNo(thanabox.Text.ToString(), Convert.ToInt32(district_no.Text.ToString())).ToString(); String thanaid = "D" + district_no.Text + "T" + thana_no.Text + ""; unionbox.DataSource = u.getUnionList(thanaid); unionbox.SelectedIndex = -1; unionbox.Select(); } catch (Exception ex) { } }