1
Hi我正在从数据库中检索Name的下拉列表。现在我想在DropDown页面中显示选定的值。我的代码如下检索数据,我使用Fluent数据作为框架。在页面中显示从DropDown中选择的值
我的控制器动作是
var query = Abc.GetProducts();
ViewBag.EnterpriseId = new SelectList(query.AsEnumerable(), "EnterpriseId", "Name");
return View();
我的看法是, @ Html.DropDownList( “EnterpriseID”,(的SelectList)ViewBag.EnterpriseID “ - 选择Resource--”)
那是什么语言?请添加相应的标签。 – assylias