mercredi 12 octobre 2022

Blazor InputCheckbox binding to string backing field

I am trying to make a dynamic form system and I want to be able to bind an InputCheckbox to a database field that's a string rather than a bool...

<InputCheckbox @bind-Value="@entry.Value" 
               class="form-check-inline" 
               style="width: 50px; height: 50px;"></InputCheckbox>

is what I am trying but entry.Value is a string and so this is giving me "Cannot convert string to bool"

Any ideas?

Thanks!




Aucun commentaire:

Enregistrer un commentaire