Change variable value on input key press on Blazor
Answer: Quoting Data Binding docs: <input @bind=”CurrentValue” @bind:event=”oninput” /> Unlike onchange, which fires when the element loses focus, oninput fires when the value of the text box changes. Using @oninput: You can achieve it without @bind directive: <input value=”@CurrentValue” @oninput=”(e)=> CurrentValue = e.Value.ToString()”/> InputText & oninput To people that are looking for oninput with InputText … Read more