<%@ Page Language="VB" %>
<script language="vb" runat="server">
Sub Page_Load(Source As Object, E as EventArgs)
If Not IsPostBack Then
MyButton.Text = "OK"
MyDropDownList.Items.Add("http://www.java2java.com")
MyDropDownList.Items.Add("http://www.java2java.com")
MyDropDownList.Items.Add("http://www.java2java.com")
End If
End Sub
Public Sub Click (ByVal sender As Object, ByVal e As System.EventArgs)
Response.Redirect(MyDropDownList.SelectedItem.Text)
End Sub
</script>
<html>
<body>
<form id="WebForm1" method="post" runat="server">
<asp:DropDownList id=MyDropDownList runat="server"/>
<asp:button id=MyButton runat="server" OnClick="Click" Text=""/>
</form>
</body>
</html>
|