Witam
do widoku przekazuję dane:
@model PortalTestowy.Models.Article
wyświetlam zawartość
<div class="form-group">
@Html.LabelFor(model => model.ArticleDateStart, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@if ( ????????? )
{
@Html.EditorFor(model => model.ArticleDateStart, new { htmlAttributes = new { @class = "form-control", disabled = "disabled" } })
}
else
{
@Html.EditorFor(model => model.ArticleDateStart, new { htmlAttributes = new { @class = "form-control"} })
}
@Html.ValidationMessageFor(model => model.ArticleDateStart, "", new { @class = "text-danger" })
</div>
</div>
Jak w if-e sprawdzić czy wartość w model.ArticleIsShared == true?
Pozdrawiam.