public class Priority public Guid Id { get; set; }} 我的视图模型和模型如下所示Model.Priorities, "Id", "Name", Model.Request.Priority), new { @class = "custom-select" }) 文本和值正确地填充了DropdownList默认的模型构建器会不会从
我正在尝试绑定一个kendo下拉列表和模型,但是我在每个选项中都没有定义。return View(Model);查看页面 //The name of the dropdownlista text.
.DataValueField("CountryID") //Specifies which property of the Product to be used
我在ASP.NET MVC中使用DropDownListFor()函数时遇到了问题: 型号: public class ShoeSizeModel public List<ShoeModel有趣的是,如果我尝试将其作为模型传递,select列表值传递得很好: ? 我可能只是遗漏了一些显而易见的东西,如果我只需要传递模型并从那里获取值,这并不是世界末日,但如果可以的话,我宁愿只传递值。有人能给我解释一下我哪里做错了吗?