lundi 17 septembre 2018

MVC two problems [on hold]

I face two problems:

  1. How i can validate list in view model?
 public List<TblRooms> TblRooms { get; set; }

  1. I add multiple open list but.
<select asp-for="TblRooms" id="RoomName" name="TblRooms[0].RoomName" class="form-control">
    <optgroup label="A" />
    <option value="a">a</option>
    <optgroup label="B"/>
    <option value="b">b</option>
</select>

one of them it doesn't look like the other it look:

enter image description here

I don't why and i don't know how to solve it?




Aucun commentaire:

Enregistrer un commentaire