jquery - ASP.NET MVC: Redirect user to route with parameters from a drop down list -


I have a drop down list ( & lt; select & gt; tags) ). When a user selects a bike in the list, then I want them to be sent to the details page for the selected bike.

I have a route for motorcycle details such as:

  routes. New route ("bike details", "bike / {likeid}", new {controller = "bike", action = "description"}, new {bikeId = @ "\ d +"});  

What's the best way?

I'm thinking that I should use the URL for drop down list item values ​​and then use JQuery to redirect to the selected URL. But before dealing with the old plain ASP.NET, I can not help but I think the people of Microsoft have thought of something cleverly for such scenarios.

Appreciate any thoughts!

to select it, Change events, but there is a button which triggers the redirect some browsers , Especially using the screen reader, do not behave well with the event of change - you are firing for each item while scrolling, because it is taking you away from the page, so A. This may be a very bad thing for some users.

You probably need to be wrapped in a form that comes back in action and the path you get through that post to get that action. That action can accept the URL as a parameter and issue a redirect to the URL. This will cover you in a case where JavaScript is turned on.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -