mvc html.dropdownlistfor selected value





Use Select2 Library in MVC.Html.DropDownListFor(x > x.SelectedPersonIds, Model.Persons.ToList() , new multiple multiple )Important: Advantage of using ListBoxFor is that when page is refreshed does not lose selected values, DropDownListFor will load only one item. PURPOSE: A journal so I dont forget important information. ASP.NET MVC Html.DropDownList Not Showing Selected Value.html helper DropDownListFor does not have an overload that takes just one argument. This tutorial explains how to create DropDownList using html helper in razor view in MVC.HtmlHelper class includes two extension methods to generate a