You could do it the way you suggested, it would work, however it would require the user to first post back to the page, then to the new page.
Private Sub DropDownList1(. . .) Handles DropDownList1.SelectionChanged
Select Case DropDownList1.SelectedIndex
Case 0
Response.Redirect("PageOne.aspx")
Case 1
Response.Redirect("PageTwo.aspx")
.
.
.
End Select
End Sub
There is another way to do it by adding an "OnChange" parameter to the HTML <asp:DropDownList> tag and setting AutoPostBack to false.
I haven't tested it but something like:
<asp:DropDownList id="ddl1" runat=Server OnChange="javascript:location.href='/pages/' + ddl1.value + '.aspx';">
. . .
</asp:DropDownList>
|