Binding a checkbox in Blazor

If you want to bind a checkbox, and have it check / uncheck based on the value, use the @bind attribute instead of @bind-value:

<td><input type="checkbox" @bind="IsGoodCoaster" />I like it</td>
  1. Leave a comment

Leave a comment