1
이 코드는 작동하지 않습니다. 양식을 제출할 때 유효성 검사 오류 메시지가 표시되지 않습니다.validate DropdownlistFor
뷰 모델
[Required]
public SelectList CountryList { get; set; }
public string Country { get; set; }
Create.aspx
<%= Html.DropDownListFor(m => m.Country,Model.CountryList, "--Select--")%>
<%: Html.ValidationMessageFor(model => model.Country,"*") %>
당신이 답변을 받아 들여야 시도 – Tassadaque