<div class="form-group">
@Html.LabelFor(model => model.Boolmainindex, "Main Topic",htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.CheckBoxFor(model => model.Boolmainindex, new
{
htmlAttributes = new { @class = "form-control", @checked = true }
})
@Html.ValidationMessageFor(model => model.Boolmainindex, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group" disabled >
@Html.Label("Main Headings", htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10" disabled>
@Html.DropDownList("InductionID", "Select a topic")
</div>
</div>
我希望“主要标题”下拉列表仅在选中“ Boolmainindex”复选框时显示,但似乎找不到方法。