의 표시 템플릿을 사용 :내가 모델이 어떻게 단지 필드
public class SomethingViewModel
{
[Required]
[Display(Name = "Customer")]
public string SomethingName { get; set; }
[Required]
[Display(Name = "Something id")]
public string SomethingId { get; set; }
}
내가 Html.EditorForModel
에 대한보기를 만들 필요하지만 필드 SomethingName 만 표시 (라벨)가 필요합니다. 이 작업을 수행하는 방법?
업데이트 : 나는 당신을 개별적으로 설치하여 LabelFor
들과 EditorFor
들 거라고 사용
확인이 http://stackoverflow.com/questions/6365633/what-is-the-html-displayfor-syntax-for –