There is 5 items in a List box When i click Item1 , textbox1 becomes visible. When i click Item2,textbox2 becomes visible. and so on. This i am able to do Code: private void lsb_SelectedIndexChanged(object sender, EventArgs e) { String tempValue; foreach (Object obj in lsb.SelectedItems) { tempValue = (String)obj; if (tempValue.ToLower() == "Item1") { textbox1.Visble=true; //Rest texbox are invisible by individually setting textbox2,textbox3,textbox4 visiblity property to false. } else if (tempValue.ToLower() == "Item2") { textbox2.Visble=true; //Rest texbox are invisible by individually setting textbox1,textbox3,textbox4 visiblity property to false. } } } My Question is that,how can i do this When I select Item1 and Item2 both,both textbox1,textbox2 should be visible or when i click the three Items,corrosponding 3 textboxes should be visible I have problem in the code,as When i click Item1 and Item2,tempValue contains Item1 only.. so it goes to the first loop. How can i achieve this multiline selection of items?