www.webdeveloper.com
Results 1 to 2 of 2

Thread: how to open an external link

  1. #1
    Join Date
    Aug 2008
    Posts
    1

    how to open an external link

    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.
    Code:
    <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

  2. #2
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    Looks like no matter what they select, they're going to yahoo.com.
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles