Hyperlink in dropdown list so when a selection is made redirects to that page
Posted on 2008-10-24
I have a web site done in ASP.NET with VB.NET. I have to add a dropdownlist that has hyperlinks so when somone selects an item from the list they are redirected to that URL. I have the following, but it's taking me anywhere. What am I doing wrong?
<asp:DropDownList id="ddlDropDown1" SelectedIndexChanged="RedirectMe" runat="server">
<asp:ListItem Value="product_list.aspx?id=8">Allergy Relief</asp:ListItem>
Sub RedirectMe(ByVal s As Object, ByVal e As EventArgs)
Dim RedirectUrl As String = ddlDropDown1.SelectedValue