Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

163
Vistas
I have a a list of Aps and i need to select one or multiple elements of that list in asp.net with c#

I'm developing a school project with asp.net core mvc and i have a list of zones and i need to select from that list multiple elements, now i'm using a select like that

<div  style="margin-bottom:2%;">
<p>Escolha os AP's que quer verificar</p>
<div style="margin-bottom:2%; width:70%; text-align:center; text-align-last:center ">
<select asp-for="ap" class="form-control">
  <option value="null"> Escolha um Ap ou todos</option>
  <option value="todos"> Todas as zonas </option>
    @foreach(var i in Model.Zones)
    {
         <option value=@i.zone_id> @i.zone_name </option>
    }
  </select>
 </div
</div> 

But when i use that i can´t select multiple options, soo exists any way to i can do that?? Even if i have to use something different.

1

Thats the zone Structure

    public class L_Zone
    {
        public short zone_id { get; set; }
        public string? zone_name { get; set; }
        public decimal latitude { get; set; }
        public decimal longitude { get; set; }
        public DateTime? ts { get; set; }
        public bool Active { get; set; }
        public short geolocation_id { get; set; }

    }
about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Add the multiple boolean attribute to the select tag as follows:

<select asp-for="ap" class="form-control" multiple>
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda