0
假设我有一个名为国家和使用实体框架的表,我想知道如何填充可用的国家(在表中列出的国家)查看为下拉列表和值返回HTTPPost控制器从实体框架中获取下拉列表的价值并返回MVC中的选定值
我得到
public ActionResult SignUp()
i think the populate code should be here but i not sure
how to retrieve from entity framework and populate into view
和
[httpPost]
public ActionResult SignUp()
i want to read the user selected value and i think is
int value = form["DropDownListName"].SelectedIndex + 1;
任何人都可以请指导我在此请提供一些提示或示例? Thx很多= D
你能举一些例子来解释一下吗?我无法让你>。< – 1myb