Doubt in the html.Dropdownlist powered by a ViewBag

0

I'm having the following problem: I need to send, instead of Id of ViewBag , Municipio , which is contained in ViewBag.Cidades .

How do I change from Id to Municipio when I click Search to send the municipality 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" />
}
    
asked by anonymous 29.11.2017 / 21:10

0 answers