hello there is a code

@Html.TextBox("bro","", new { @list = "browsers", @placeholder = "place"}) <datalist id="browsers"> <option>somevalue</option> </datalist> 

prompt analog datalist in asp net UPD.Pryproval

 <datalist id="browsers"> @foreach (var c in ViewBag.List) { <option>@Convert.ToString(c.Name)</option> } </datalist> 

not what, but if instead of @Convert.ToString(c.Name) you simply insert a string, then it generates it by the number of the loop pass

    1 answer 1

    Select2 I think you fit. https://select2.imtqy.com/examples.html

    And do not pass through ViewBag modelku. It is always better to create your own model.