What I need is to do is--> Bind 2 DropDownListFor on a view with 2 different model, which I know can't be achieved as only one model can be called on a single view.
Initial Requirement
@Html.DropDownListFor(M => M.MobileList, new SelectList(Model.MobileList,"Value", "Text"))
@Html.DropDownListFor(M => M.CountryList, new SelectList(Model.CountryList,"Value", "Text"))
What I did
Binded one of the dropdown using
@Html.DropDownListFor(M => M.MobileList, new SelectList(Model.MobileList,"Value", "Text"))
For the Other Used ViewBag.
@Html.DropDownList("Countrylist", (IEnumerable<SelectListItem>)ViewBag.Countrylist, new { id = "CountryId", @class = "form-control", @multiple = "multiple" })
But I need to create both the dropdown using @Html.DropDownListFor razor code.