Remove multiple selection from asp.net core application -


i have list<selectlistitem> variable 2 values. want represent dropdown box in html i'm doing this.

<div class="form-group row">     <label asp-for="roles" class="col-sm-2 col-sm-offset-2 form-control-label"></label>     <div class="col-md-6">         <select asp-for="roles" asp-items="@model.roles" class="form-control selectpicker bs-select-hidden"></select>     </div>            </div> 

and code shows me list 2 items, generates

multiple="multiple" 

attribute select tag.

how can make not generate multiple attribute?

set multiple=false in select


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -