Здесь я использовал два флажка
<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>
и тип данных для checboc, т.е. asp-for="SendReport" and asp-for="SendInvoice"
- bit
.
Теперь проблема в том, что когда я пытаюсь загрузить страницу, она выдает ошибку, как показано ниже
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>
Любая помощь будет сердечно благодарна. Спасибо