lundi 30 novembre 2015

How can bind nullable boolean field in razor mvc5?

I pass model to my razor. One of field is bool? . How can i bind this field to check box ?

@model bool?

@Html.CheckBox(...)

@Html.CheckBoxFor(...)

@Html.CheckBox("", Model.GetValueOrDefault())




Aucun commentaire:

Enregistrer un commentaire