M
Miguel Dias Moura
Hello,
I have a Drop Down List with 3 options. I want to redirect to a new page
when an options is selected. I don't want to use a button. The redirection
should be fired when the option is selected.
I have an ASP.net / VB page with a Drop Down List named "my select" as
follows:
<asp
ropDownList AutoPostBack="true" ID="myselect" runat="server">
<asp:ListItem value="www.google.com">Google</asp:ListItem>
<asp:ListItem value="www.yahoo.com">Yahoo</asp:ListItem>
<asp:ListItem value="www.macromedia.com">Macromedia</asp:ListItem>
</asp
ropDownList>
Then i have this script:
<script runat="server">
Sub Page_Load(Sender As Object, E As EventArgs)
if myselect.AutoPostBack then
Response.Redirect ("http://" &
myselect.items(myselect.SelectedIndex).Value)
end if
End Sub
</script>
I looked in the .net and tryied several options but until now i wasn't able
to make it work
This seems really simple. I don't know what is going on and i need to
deliver this as soon as possible. Can you help me?
Thank You,
Miguel
I have a Drop Down List with 3 options. I want to redirect to a new page
when an options is selected. I don't want to use a button. The redirection
should be fired when the option is selected.
I have an ASP.net / VB page with a Drop Down List named "my select" as
follows:
<asp
<asp:ListItem value="www.google.com">Google</asp:ListItem>
<asp:ListItem value="www.yahoo.com">Yahoo</asp:ListItem>
<asp:ListItem value="www.macromedia.com">Macromedia</asp:ListItem>
</asp
Then i have this script:
<script runat="server">
Sub Page_Load(Sender As Object, E As EventArgs)
if myselect.AutoPostBack then
Response.Redirect ("http://" &
myselect.items(myselect.SelectedIndex).Value)
end if
End Sub
</script>
I looked in the .net and tryied several options but until now i wasn't able
to make it work
This seems really simple. I don't know what is going on and i need to
deliver this as soon as possible. Can you help me?
Thank You,
Miguel