Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想创建 MVC razor HtmlDropdownlist,它具有多个值的选项,例如选项具有学生的名称和班级这两个属性。
当我想选择下拉列表时,两个属性同时出现。
东风456
如果您要从数据库中提取这些值,您可以将两个字段连接为一个并将其提取到列表中。最后将列表显示到下拉列表中。