.aspx code:
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem value="">About Us</asp:ListItem>
<asp:ListItem Value="1">Contact</asp:ListItem>
</asp:DropDownList>
</div>
</form>
.aspx.vb code:
Protected Sub DropDownList1_SelectedIndexChanged(sender As Object, e As EventArgs)
If DropDownList1.SelectedValue = "1" Then
Response.Redirect("Contact.aspx")
End If
End Sub
When I click on contact from the dropdown menu, it is not redirecting me to the other page, please help.
On your DropDownList you need to include AutoPostBack="True" to tell the server to postback to the server. Also you need to assign the event name using OnSelectedIndexChanged
For example: