<%=Html.DropDownListFor(model => model.PID, (IEnumerable<SelectListItem>)ViewData["MainItemOfGame"], "请选择")%>

 

 

 

ViewData的名不能和DropDownList的name 相同,否则,DropDownList不会设为model => model.PID的值对应的选项。

 

 

相关文章:

  • 2022-02-23
  • 2022-12-23
  • 2021-11-20
  • 2022-02-12
  • 2021-05-09
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
猜你喜欢
  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
  • 2021-06-02
  • 2022-12-23
  • 2021-12-16
  • 2021-12-22
相关资源
相似解决方案