HI,
I have a simple ViewBag with boolean result, which this value contain nullable boolean.
My Problem is, when ViewBag result (when true, false or null bool) send to input type CheckBox.
my input type always show false value
ViewBag.IsWarranty = true ;
ViewBag.IsWarranty = false;
ViewBag.IsWarranty = null;
{
Layout = null;
var _iswarranty = ((bool)(ViewBag.IsWarranty ?? false : ViewBag.IsWarranty ));
}
<input type="checkbox" name="IsWarranty" value="_iswarranty" />