DropDownlist selected value - MVC 3.0
I have a problem with selected value in View, the item shown is the default value on Edit, not the correct value of the object.
public List<Interop.GcpBE750.GcpBECondPagamento> GetAll(){....}
Edit Method :
BSCondPagamento ctlCondPag = new BSCondPagamento(p);
CondPag = new SelectList(ctlCondPag.GetAll(), "CondPag", Descricao",Cliente.get_CondPag());
View Class:
<span class="span-ed开发者_如何学Goitor">Modo Pag.</span>
@Html.DropDownList("ModoPag", Model.ModoPag, "Seleccione o Modo de Pagamento")
What i'm doing wrong ?
Just change the Name of the DropDownlist and starts work..... still don't know why.
精彩评论