asp.net mvc html.dropdownlistfor selected value

 

 

 

 

Use Select2 Library in Asp.net 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 asp.net MVC.HtmlHelper class includes two extension methods to generate a