开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜