Hey – you’ve all seen these HTML select lists before that, after you picked a web site from the list, you’d be redirected there. In the old days, this was commonly done with client-side Javascript.
This example shows a way this can be done using ASP.NET
<html>
<head>
<meta name=”GENERATOR” Content=”ASP Express 2.0″>
<title>DropDownList URL Picker</title>
<script language=”VB” runat=”server”>
Sub gothere(Source as Object, E as EventArgs)
response.Redirect(“http://” & ddl.selecteditem.text & “.com”)
End Sub
</script>
</head>
<body>
<Form id=”PutIDNameHere” runat=”server”><b>Choose URL: </b> <br>
<asp:dropdownlist id=”ddl” runat=”server”>
<asp:listitem selected=”true”>AspExpress</asp:listitem>
<asp:listitem>ASPWebhosting</asp:listitem>
<asp:listitem>123aspx</asp:listitem>
<asp:listitem>ASPFree</asp:listitem>
<asp:listitem>DotNetJunkies</asp:listitem>
<asp:listitem>ASPAlliance</asp:listitem>
</asp:dropdownlist>
<asp:Button id=”button1″ Text=”Go There” onclick=”gothere” runat=”server” />
</Form>
</body>
</html>