I have a problem to reset a dropdownlist is c# I have hiden and showed dropdown's depending on a value in the first selection dropdown box my code did work but i remembered you can type in a combobox and changed it to dropdownlist in visual studio and after that nope not working anymore. so basically i don't want the items to be removed from list it must just be at the starting "empty value" like it was when program loaded here is the code that worked before the change
if(serviceFault_cb.Text == "Report Fault")
serviceType_cb.Text = "";
else if (serviceFault_cb.Text == "Service and Faults")
faultMain1_cb.Text = "";
Add an empty item into each combobox that would work as a deselected value. Add it before you add the actual items, then you can deselect a value by doing
serviceType_cb.SelectedIndex = 0; panel_erviceType.Show();
Also I'd suggest using a panel to encapsulate the combobox with it's corresponding label to hide them simultaneously.