<select id="FloorType" name="FloorType"> @{ var check = ""; } @if (floorItem != null) { foreach (var item in floorItem) { if (item.SysNo.ToString().Equals(Model.FloorType)) { check = "selected=‘selected‘"; } else { check = ""; } <option @check value="@item.SysNo">@item.FloorTypeName</option> } } </select>