I am making an application that deals with vehicles. I need two DropDownLists:
- Makes: All Vehicle Makes
- Models: Models that belong to the selected
value of the Make DropDownList
How is this done in MVC2?
My Idea: Do I use an ajax call when my first list is selected and then pull back the Models to bind to the Model DDL? How would model binding come into play that way?
UPDATE I posted what I ended up doing as an answer. It is super simple and works great.
You can use a get too if you feel so inclined, but you have to specify that you want to like so… return Json(citiesList, JsonRequestBehavior.AllowGet);
This is what I ended up doing… Didn’t need additional plugins / 1000 Lines of code…
The Html
The JQuery
The Action