@Html.DropDownListFor(model => model.Birthday.Year,ViewData["year"] as SelectList)
@Html.DropDownListFor(model => model.Birthday.Month,ViewData["month"] as SelectList)
@Html.DropDownListFor(model => model.Birthday.Date,ViewData["date"] as SelectList)
将日期换为下拉框DropDownListFor,页面可以显示数据库日期的值,但点保存 model中Birthday为null,不知为何,这样写法有错误?
传到后台的是 year,Month,data 而不是 Birthday