下面是我的edit.cshtml
如果SubClient_ID
中的值为“是”,则我需要按Group_Rollup_Flag
字段隐藏,如果Group_Rollup_Flag
为空,则取消隐藏。
我该怎么做?我将如何为此写if
语句?
<div>
<div class="form-group col-xs-4">
@Html.LabelFor(model => model.MasterClient_ID, htmlAttributes: new { @class = "control-label col-md-2 required-label" })
<div class="col-md-10">
@Html.DropDownList("MasterClient_ID", null, htmlAttributes: new { @class = "form-control input-block-level" })
@Html.ValidationMessageFor(model => model.MasterClient_ID, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group col-xs-4">
@Html.LabelFor(model => model.SubClient_ID, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.DropDownList("SubClient_ID", null, "--Select--", htmlAttributes: new { @class = "form-control input-block-level" })
@Html.ValidationMessageFor(model => model.SubClient_ID, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group col-xs-4">
@Html.LabelFor(model => model.RebateClient_ID, htmlAttributes: new { @class = "control-label col-md-2 required-label" })
<div class="col-md-10">
@Html.DropDownList("RebateClient_ID", null, "--Select--", htmlAttributes: new { @class = "form-control input-block-level" })
@Html.ValidationMessageFor(model => model.RebateClient_ID, "", new { @class = "text-danger" })
</div>
</div>
</div>