Created
December 3, 2019 20:54
-
-
Save gavilanch/d9fdf5dbb17467b36f88a1273611c1ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="form-group"> | |
<label>State:</label> | |
<div> | |
<InputSelectNumber class="form-control" | |
@bind-Value="Person.StateId" | |
> | |
<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> | |
} | |
else | |
{ | |
<option value="@item.Id">@item.Name</option> | |
} | |
} | |
</InputSelectNumber> | |
<ValidationMessage For="@(() => Person.StateId)" /> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment