-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Description
Description
According to your tutorial, when I interact with the BindTheory.razor page:
When the BindTheory component is rendered, the value of the HTML demonstration element comes from the InputValue property. When the user enters a value in the text box and changes element focus, the onchange event is fired and the InputValue property is set to the changed value. In reality, code execution is more complex because @Bind handles cases where type conversions are performed. In general, @Bind associates the current value of an expression with the value attribute of the and handles changes using the registered handler.
Bind a property or field on other DOM events by including an @Bind:event="{EVENT}" attribute with a DOM event for the {EVENT} placeholder. The following example binds the InputValue property to the element's value when the element's oninput event (input) is triggered. Unlike the onchange event (change), which fires when the element loses focus, oninput (input) fires when the value of the text box changes.
Ah, no. Nothing happens. Why does nothing happen? I put BindTheory.razor into the Components/Pages folder of the main project, not the Client problem. Is that why it doesn't work?
Page URL
https://learn.microsoft.com/en-us/aspnet/core/blazor/components/data-binding?view=aspnetcore-9.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/components/data-binding.md
Document ID
3f912dfc-5ba5-6c6c-ba93-1ae78508a5cc
Article author
Metadata
Metadata
Assignees
Labels
Type
Projects
Status