bueno estoy haciendo un ejrecicio de asp.net empeze hace 1 semana y bueno no he encontrado un buen manual asi ke este es mi problema.
lo ke kiero hacer es ke al escoger una opcion de un DropDownList digamos "rojo"
ke en otro DropDownList vacio se llene con "1,2,3" s escojo azul ke se llene con "a,b,c" tengo esto hasta ahora.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<script>
Sub envia(sender As Object, e As EventArgs)
if color.SelectedItem.Text ="rojo" then
llenar.SelectedItem.Text="1,2,3"
else if
color.SelectedItem.Text ="azul" then
llenar.SelectedItem.Text="a,b,c"
else
end if
end sub
</script>
<title>Departamentos</title>
</head>
<body>
<form id="form1" runat="server">
Nombre:<asp:textbox id="nombre" runat="server"></asp:textbox>
<p/>
Apellido:<asp:textbox id="apellido" runat="server"></asp:textbox>
<p/>
color<asp:DropDownList id=departamento runat="server">
<asp:ListItem>rojo</asp:ListItem>
<asp:ListItem>azul</asp:ListItem>
</asp:DropDownList>
<asp:DropDownList id=llenar runat="server">
</asp:DropDownList>
</form>
</body>
</html>
pero no sale nada pues ahi estoy alguna sugerencia