Retrive Asp:DropDownList Addes Items [modified]
-
Hi, I develop a project in ASp.net in my project i use java script function to add textbox value to Dropdownlist when i click ASp.Butoon the Dropdownlist values age disappeared i can't get dropdownlist values how can i get pls help me sn-asp:TextBox list-asp:DropDownList function Button8_onclick() { var t alert("Hai"); //alert(document.form1.elements["dl"].value); //alert(document.getElementById("sn2").value);if(document.getElementById("sn").value!="") { if(document.getElementById("list").value=="1") { t = document.getElementById("sn").value st = new Option(t,t)document.getElementById("snum1").add(st); } if(document.getElementById("list").value=="2") { t = document.getElementById("sn").value st = new Option(t,t) document.getElementById("snum2").add(st); } if(document.getElementById("list").value=="3") { t = document.getElementById("sn").value st = new Option(t,t) document.getElementById("snum3").add(st); } if(document.getElementById("list").value=="4") { t = document.getElementById("sn").value st = new Option(t,t) document.getElementById("snum4").add(st); } if(document.getElementById("list").value=="5") { t = document.getElementById("sn").value st = new Option(t,t) document.getElementById("snum5").add(st); } if(document.getElementById("list").value=="6") { t = document.getElementById("sn").value st = new Option(t,t) document.getElementById("snum6").add(st); } if(document.getElementById("list").value=="7") { t = document.getElementById("sn").value st = new Option(t,t) document.getElementById("snum7").add(st); } if(document.getElementById("list").value=="8") { t = document.getElementById("sn").value st = new Option(t,t) document.getElementById("snum8").add(st); } if(document.getElementById("list").value=="9") { t = document.getElementById("sn").value st = new Option(t,t) document.getElementById("snum9").add(st); } if(document.getElementById("list").value=="10") { t = document.getElementById("sn").value st = new Option(t,t) document.getElementById("snum10").add(st); } } code Window protected void Button10_Click(object sender, EventArgs e) { for (int j = 0; j < snum10.Items.Count; j++) { //tListt.Items.Add(snListt.Items[j].ToString()); snd[10] = snd[10] + "/" + snum10.Items[j].ToString(); } } snd[] string Array snum1 DropDownlist
mo