Here i want to set the first checkbox checked.I am not understanding how,since its in a viewbag.
<div class="form-group">
@Html.LabelFor(m => m.RBO_Location, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@foreach (var item in (SelectList)ViewBag.Branches)
{
<div>
<input type="checkbox" name="selectedBranches" value="@item.Value" class="checkbox-inline" />
@Html.Label(item.Text, new { @class = "control-label" })
</div>
}
</div>
</div>
Aucun commentaire:
Enregistrer un commentaire