How to enable/disable inputs in blazor
To disable elements you should use the disabled attribute. I’ve modified your code a bit and this will do what you’re after. Blazor will automatically add or remove the disabled attribute based on the IsDisabled value. You should use the disabled attribute on your button as well. It’s a much better practice. <button type=”button” disabled=”@IsDisabled”></button> … Read more