This is my code now, it displays all emails from my database but the begin value of my dropdown should be nothing.
<div class="col-sm-10"> <select asp-for="client.Email" name="client.Email" id="client.Email"> <br /> @foreach (var res in clientRepository.GetAllClients()) { <option [email protected]>@res.Email [email protected]</option> } </select> <span asp-validation-for="client.Email" class="text-danger"></span> </div> </div>
2.1m questions
2.1m answers
60 comments
57.0k users