0
I’m having the following problem: I need to send instead of the Id
of ViewBag
, the Municipio
, which is contained in ViewBag.Cidades
.
How Do I Switch from Id to Municipio
when I click Search to send Municipio through the controller?
@using (Html.BeginForm("Colecao", "Cliente", FormMethod.Get))
{
<td>
@Html.DropDownList("Id", (IEnumerable<SelectListItem>)ViewBag.Cidades)
</td>
<input type="submit" value="Buscar" class="btn btn-default" />
}
Municipality is an attribute of Cities?
– Leandro Angelo
can for more details, copy of the class "Cities" ?
– NIZZOLA