click here for the first image
click here for the second image
In my controller, I have two viewbags set up like this:
ViewBag.MyCategory = new SelectList(db.RecyclableType, "id", "type");
ViewBag.iddd = new SelectList(db.RecyclableType, "id", "type");
And in my View:
@Html.DropDownList("iddd", (IEnumerable<SelectListItem>)ViewBag.iddd, "SELECT ITEM TYPE", new { @class = "form-control" })
@Html.DropDownList("MyCategory", (IEnumerable<SelectListItem>)ViewBag.MyCategory, "SELECT ITEM TYPE", new { @class = "form-control"})
I attempted to create a function as shown below but it is not functioning correctly:
document.getElementById("iddd") = document.getElementById("MyCategory");