Using :
How to create a Dynamic Bootstrap Multiselect
It was pretty easy to come up with this :
<fieldset class="my-fieldset" style="width: 500px;">
<legend class="my-fieldset">Catégories</legend>
<div style="text-align: center;">
<div style="display: inline;">
<span><b>Matériels</b></span>
<select style="display: none;" class="chkveg" name="categories" multiple="multiple">
@foreach (var configCateg in listeCategories)
{
if (configCateg.APPR_CATEGORIE.CATEGORIE.StartsWith("IF"))
{
<option selected="False" value="@configCateg.DESCRIPTION">@configCateg.DESCRIPTION</option>
}
}
</select>
</div>
</div>
</fieldset>
But what if i want to have some of the options selected and others not...
I know there is a selected property but it didn't change anything when i tried selected="false"
Any help is apreciated