I'm trying to fill a DropList.For when I select an item from another DropList.For. Here is my code so far:
@Html.LabelFor(m => m.Cliente, new { @class = "control-label col-md-2" })
@Html.DropDownListFor(model => model.SelectedCategoryId,
new SelectList(Model.Cliente, "CategoryId", "CategoryName"), "- Please Select -")
@Html.ValidationMessageFor(x => x.Cliente, null, new { @class = "label label-danger" })
@Html.LabelFor(m => m.Tipo_servicio, new { @class = "control-label col-md-2" })
@Html.DropDownListFor(model => model.SelectedCategoryId,
new SelectList(Model.Tipo_servicio, "CategoryId", "CategoryName"), "- Please Select -")
@Html.ValidationMessageFor(x => x.Tipo_servicio, null, new { @class = "label label-danger" })
So I have it in my view and filled it with EntityFramework