Here i have used two checkbox
<label asp-for="SendReport" class="checkbox-inline"><input type="checkbox" asp-for="SendReport" />Send Report</label><br>
<label asp-for="SendInvoice" class="checkbox-inline"><input type="checkbox" asp-for="SendInvoice" />Send Invoice</label><br>
and data type for both checboc i.e asp-for="SendReport" and asp-for="SendInvoice"
is bit
.
Now the problem is that when ever i try to load the page its throws error as below
Unexpected 'asp-for' expression result type 'System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]' for <input>. 'asp-for' must be of type 'System.Boolean' or 'System.String' that can be parsed as a 'System.Boolean' if 'type' is 'checkbox'.<br>
Any help will be heartly thankful. Thank you
bit field
tocheckbox
?checkbox
is binded bytrue
orfalse
, how did you decide when to check thecheckbox
bybit
? What is the value forbit field
? – Trauner