首页 > 代码库 > Html.DropDownListFor

Html.DropDownListFor

@Html.DropDownListFor(x => x.WillAttend, new[] {                        new SelectListItem() {Text = "Yes, I‘ll be there",                        Value = bool.TrueString},                        new SelectListItem() {Text = "No, I can‘t come",                        Value = bool.FalseString}                        }, "Choose an option")

bool.FalseString