I am new to ASP MVC development. I wanted to ask that how can i set the check box value to true or false based on the bool variable result? I have tried using the following approach:
@Html.CheckBoxFor(f => f.SFLandRFListAttached, new {Value = @ViewBag.formfetched.SFLandRFLListAttached})
Like here "@ViewBag.formfetched.SFLandRFLListAttached" returns a bool value, but it doesn't check/uncheck the checkbox. Please help I am new to MVC coding.
Aucun commentaire:
Enregistrer un commentaire