JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Text Boxes & Inputs › Blazor Input OnChange Event Handling › Reply To: Blazor Input OnChange Event Handling
November 14, 2023 at 8:42 pm
#109160
ivanpeevski
Participant
Hi Brandon,
There are a few different ways to capture the value of the input. For example, you can use two-way value binding:
<h3>@textValue</h3>
<Input @bind-Value=”@textValue” OnChange=”changeEvent”></Input>
@code{
string textValue = “”;
private void changeEvent(Event ev)
{
Console.WriteLine(textValue);
}
}
Best Regards,
Ivan Peevski
Smart UI Team
https://www.htmlelements.com/