I have a drop down list (<select>
tag) filled with bikes (more specifically their names). When a user selects a bike in the list I want them to be redirected to the details page for the selected bike.
I have a route for bike details as such:
routes.MapRoute("BikeDetails",
"bike/{bikeId}",
new {
controller = "Bike",
action = "Details"
},
new { bikeId = @"\d+" });
What is the best way solve this?
I'm thinking maybe I should use the URLs for the drop down list item values and then use JQuery to redirect to the selected URL. But having dealt with old plain ASP.NET before, I can't help but think the guys at Microsoft have thought something clever out for scenarios such as this one.
Any ideas appreciated!