I have a view in place that contains 2 @DropDownListFor\'s Helpers:
@using (Html.BeginForm(\"CreateOneWayTrip\", \"Trips\"))
{
@Html.Validati
Can you try the following?
This is a post that i answared some days ago. Font:Dynamic DropDownLists In MVC 4 Form
You should create a ajax call in the change event of the province ddl. This call will request to an action and return the cities of selected province.
$("province_dll").change(function(){
$.ajax({
url: 'getCitiesController/getCitiesAction',
type: 'post',
data: {
provinceId: provinceIdVar
}
}).done(function(response){
$("cities_dll").html(response);
});
});
In the action:
[HttpPost]
public ActionResult getCicitesAction(int provinceId)
{
var cities = db.cities.Where(a => a.provinceId == provinceId).Select(a => "'";
return Content(String.Join("", cities));
}