mercredi 17 août 2016

How to stop toggling of checkbox for corresponding label on strongly typed views

I have a bool property "retry" and created a strongly typed view but my problem is whenever I click on the label

@Html.LabelFor(model => model.IsReTry, new { @class = "control-label col-md-5"})
@Html.CheckBox("ISretry",Model.IsReTry)

the checkbox is toggling I don't want this to happen I know we can use just @Html.CheckBox but is there anyway we can use @Html.CheckBoxFor and not getting checked or unchecked when we click on the corresponding label




Aucun commentaire:

Enregistrer un commentaire