Hello, I have code as following. But there are more than three items in the drop downlist. What 's the problem ? (The dropdown list is 1,1,1,1,1,2,3,1,2,3,1,2,3)
<html>
<head>
<title>Ch6-3-5.aspx</title>
<script language="VB" runat="Server">
Sub Page_Load()
Ship.items.add("1")
Ship.items.add("2")
Ship.items.add("3")
End Sub
Sub button_Click(Sender As Object, e As Eventargs)
show.Text = Ship.SelectedItem.Text
End Sub
</script>
</head>
<body>
<p>Web - DropDownList</p><hr>
<form runat="Server">
<p></p>
<asp
ropDownList id="Ship" Width="100px" runat="Server">
</asp
ropDownList>
<asp:button id="Button" Text="send" OnClick="button_Click" runat="Server"/>
</form>
<asp:Label id="show" font-bold="true" runat="Server"/><br>
</body>
</html>
<html>
<head>
<title>Ch6-3-5.aspx</title>
<script language="VB" runat="Server">
Sub Page_Load()
Ship.items.add("1")
Ship.items.add("2")
Ship.items.add("3")
End Sub
Sub button_Click(Sender As Object, e As Eventargs)
show.Text = Ship.SelectedItem.Text
End Sub
</script>
</head>
<body>
<p>Web - DropDownList</p><hr>
<form runat="Server">
<p></p>
<asp
</asp
<asp:button id="Button" Text="send" OnClick="button_Click" runat="Server"/>
</form>
<asp:Label id="show" font-bold="true" runat="Server"/><br>
</body>
</html>