Q:

How are input components enabled/disabled in Blazor?

0

This code will help you to understand how to input components enabled/disabled in Blazor.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Use the “Disabled” attribute to disable the input component. In the following example, input and checkbox are disabled on button click.

<button @onclick="@onDisable">Disable</button>

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

<input type="checkbox" disabled="@isDisable" />

<button disabled="@isDisable">button</button>


@code {

    private bool isDisable { get; set; }

    private void onDisable()
    {
        this.isDisable = true;
    }
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now