Q:

How do I check the checkbox based on the text entered in the textbox?

0
This code will help you to understand how to check the checkbox based on the text entered in the textbox.
 
 

All Answers

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

To check the checkbox, use the textbox input event to get the entered text, and based on the text enable or disable it. In the following example, if the entered text is “check”, using the @bind attribute you can enable the checkbox.

<input @oninput="@((args) => { this.isCheck = ((string)args.Value == "check") ? true : false; })" />

<br />

<input type="checkbox" @bind="@this.isCheck" />

@code {

    private bool isCheck { get; set; }

}

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