mercredi 17 juin 2015

MVC3 Dropdown list and Bootstrap Modal does select the server value of the list

Well, im using .Net MVC3 with razor and the modals from bootstrap to make a web page.

This is my view:

Clientes: @Html.DropDownList("Clientes", new SelectList(Datamodel.GestorDatos.ConjuntoClientes.ListarClientesStatic(), "Codigo", "Empresa", 24), new {@class = "form-control chosen", id = "Clientes" })

I'm sending from the server two objects one with the primary key 23 and another with the primary key 24 those two objects are in a "IEnumerable" object. I don't know why with the modal always choose me the 23 value as default.

Aucun commentaire:

Enregistrer un commentaire