Hello, I have Html.DropDownList
element in View.
<%= Html.DropDownList("ID", (IEnumerable<SelectListItem>)ViewData["VItemID"])%>
In Controller:
ViewData["VItemID"] = new SelectList(_dataManager.myItems.getItems(), "ID", "ItemID");
I want to add option with text="----". I want do it in view layer.
I have done this with jquery, but I think it's not good idea using js code to solve problem.
What is the best way to do this?