Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<div class="form-group">
<InputSelectNumber class="form-control"
<option value="0">--Select a state--</option>
@foreach (var item in States)
@if (item.Id == Person.StateId)
<option selected value="@item.Id">@item.Name</option>
<option value="@item.Id">@item.Name</option>
<ValidationMessage For="@(() => Person.StateId)" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.