Click to See Complete Forum and Search --> : how to open an external link


slash2008
08-23-2008, 12:54 AM
hello. I am new to .net and i am trying to create a drop down list and make the user select an item which will redirect him to an external link. i dont know if i am doing it the right way.
<asp:DropDownList id="drop1" runat="server" Width="118px">
<asp:ListItem>Games</asp:ListItem>
<asp:ListItem>Google</asp:ListItem>
<asp:ListItem>Yahoo</asp:ListItem>

</asp:DropDownList>
Protected Sub drop1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles drop1.SelectedIndexChanged
Select Case sender.SelectedIndex
Case 0
Page.Response.Redirect("http://www.yahoo.com")

Case 1

Page.Response.Redirect("http://www.yahoo.com")
Case 2
Page.Response.Redirect("http://www.yahoo.com")
End Select
End Sub

chazzy
08-24-2008, 08:36 AM
Looks like no matter what they select, they're going to yahoo.com.