I Have this in my controller
ViewBag.list = new SelectList(db.ListOfDB, "Value", "Text");
I need to create a Select, but without using the @Html.DropDownList I try to use this:
<select id="mylist"> ??? (selectitem) @ViewBag.list ??? </select>
How create select based from Viewbag, but not use Html.Helper
You can pass your list to the view on your model. You could then do
<select id="myList">
@foreach(var item in Model.myList)
{
<option value="@item.Value">item.Name</option>
}
</select>