redirecting with a dropdown

T

thersitz

Does anyone know of a how-to page that can show me how to store a url in a
table, fill a drop down with that table using the url field as the
DataValueField and have it redirect the user to the url attached to the
given selection? I am able to postback to a page in my site and even a
direct url. I've been googling, but no direct hit.

If I do something like this it succeeds

Response.Redirect("default.aspx")
Response.Redirect("http://www.google.com")

But if I do this it fails

Response.Redirect(DropDownList1.SelectedItem.Value) -- where value equals a
full url pulled in from the table.

Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
Response.Redirect(DropDownList1.SelectedItem.Value)
End Sub

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,192
Latest member
KalaReid2

Latest Threads

Top