I have two dropdownlist which grabs data from a ViewData. The viewData holds a SelectedListItem, which is a set of times (1pm,2pm,3pm..) the time doesn’t really have anything to do with the model (as I convert it to UTC) so that is why I created it as a viewbag. I have it used in two spots in the view, but the code is producing the same IDs
@Html.DropDownList("times",null,new {@class="ddl"})
<select class="ddl" id="times" name="times"><option value="0">1PM</option>
I think it’s relatively easy to change the ID, I just can’t find the exact spot within the Html.DropDownList
Change the value of the first parameter, that is what sets the ID