专题文章
时长:00:00更新时间:2020-11-27 22:35:33
本文实例为大家分享了MVC5下拉框单选绑定的具体代码,供大家参考,具体内容如下:1.Model;[Display(Name = "学历")] public ICollection<;System.Web.Mvc.SelectListItem>;asdflist{ get;set;} //下拉框的类型[Display(Name = "学历")][Required]public int asdf { get;set;} //学历这个字段的属性。2.controller。(1)先写一个程式绑定,可以通过数据库绑定或者直接绑定。
查看详情