I try to set checked
attribute for <input type="checkbox"/>
:
checked="<%#Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "IsOperationPerformed")) ? "checked" : string.Empty%>"
But I get an error
Argument type ‘string’ is not assignable to parameter type ‘bool’
IsOperationPerformed
of type Boolean
.
How can I add cheched
attribute?
As per my knowledge, CheckBox should be equal to either true or false and not checked or empty. Try changing it and revert if problem still occurs. Hope i helped.