我有这样的下拉列表,从数据库获取数据,但不正确显示数据n视图 的代码如下: 查看: @Html.DropDownListFor(m=> Model.SystemRAteModel.Role, new SelectList(Model.SystemRAteModel.GetRole.Items),"Value","Text")
型号: public class SystemRolesModel
我对此很陌生。我正在使用Northwind数据库。 地区说明显示在下拉列表中,但是当我尝试创建新客户时,没有新记录保存到数据库中,因为dropdownlist选定的值不起作用。这两个表格不与模型中的外键链接。 任何帮助?!谢谢你这么。 this is the view :
@model Northwind.Customer
@{
ViewBag.Title = "Cr