0
이 부울 검사를 어떻게 수행 할 수 있는지 궁금합니다. 난 당신이 간단하게 할 수있는, 그것은 model.active
이후mvc3 부울 검사보기 C#
@model Project.Domain.Worker //active is a value in worker
@if (model => model.active == true) { //this doesn't work
<div class="editor-label">
@Html.LabelFor(model => model.param)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.param)
@Html.ValidationMessageFor(model => model.param)
</div>
}
K 덕분에 오류가 발생했습니다. 자본 사용 Model.active 감사합니다. – DavidVdd
@DavidVdd - 'Model' (자본 M)을 사용하여 모델에 액세스 할 때? – Oded