Blazor - How to enable or disable input field?

<button type="button" disabled="@IsDisabled">Click Me</button>

<input @bind="IsDisabled" type="checkbox" />


<input disabled="@IsDisabled" type="text" />


@code{

    bool IsDisabled { get; set; }

}

Reactions

Post a Comment

0 Comments