个别元素的绑定(<%:Html.DropDownListFor()%>)

 <%:Html.DropDownListFor(x => x.ProvinceId, new SelectList((IEnumerable)ViewBag.Provinces, "Id", "Name"), "---请选择省份---")%>
                    <%:Html.DropDownListFor(x => x.CityId, new SelectList((IEnumerable)ViewBag.Cities, "Id", "Name"), "---请选择城市---")%>


<%:Html.RadioButtonFor(x => x.Sex, "男")%>男
                <%:Html.RadioButtonFor(x => x.Sex, "女")%>女
                <%:Html.RadioButtonFor(x => x.Sex, "保密")%>保密

你可能感兴趣的:(个别元素的绑定(<%:Html.DropDownListFor()%>))