function Select_Changed() {
var temp = document.all('DropDownList1').options[document.all('DropDownList1').selectedIndex].text;
switch(temp)
{
case "GroupA":
document.all("DropDownList2").options.length = 0;
var tOption = document.createElement("Option");
tOption.text= "a";
tOption.value=document.all("DropDownList2").options.length+1;
document.all("DropDownList2").add(tOption);
var tOption = document.createElement("Option");
tOption.text= "b";
tOption.value=document.all("DropDownList2").options.length+1;
document.all("DropDownList2").add(tOption);
break;
default:
break;
}
}
</script>
<asp:DropDownList id="Dropdownlist1" οnchange="Select_Changed()" runat="server" >
<asp:ListItem Value="GroupA">GroupA</asp:ListItem>
<asp:ListItem Value="GroupB">GroupB</asp:ListItem>
<asp:ListItem Value="GroupC">GroupC</asp:ListItem>
<asp:ListItem Value="GroupD">GroupD</asp:ListItem>
</asp:DropDownList>