I want people to choose from a dropdown list,and their choice takes them to a page they have chosen.
+3
A:
In aspx
<asp:DropDown ID="MyDropDown" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RedirectUser">
<asp:ListItem Value="/MyPage.aspx" Text="MyPage"/>
</asp:DropDown>
In code behind
protected void RedirectUser(object sender, EventArgs e)
{
Response.Redirect(MyDropDown.SelectedValue);
}
Okay read the "question" again and you didn't specify ASP.NET but nevermind, more details in the question would have helped
Nick Allen - Tungle139
2009-02-24 10:44:19
+3
A:
You can use something like this with a bit of javascript:
<select name='jumpMenu' onchange='javascript:window.location.href = this.value;'>
<option value='Department.aspx?DeptID=0'>--Department 0</option>
<option value='Department.aspx?DeptID=1'>--Department 1</option>
<option value='Department.aspx?DeptID=2'>--Department 2</option>
<option value='Department.aspx?DeptID=3'>--Department 3</option>
</select>
EJB
2009-02-24 10:45:05