Q:

What is two way data binding in Blazor?

0

This code will help you to understand how to two way data binding in Blazor.

All Answers

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

Two-way is having a bi-directional data flow, i.e., passing the value from the property to the UI and then from the view (UI) to the property as well The synchronization of data flow between model and view is achieved using the bind attribute in Blazor. Refer to the following code example for two-way data flow.

@page "/"
    
   Enter your name: <input type="text" @bind="@Name" /><br />
    
   <h2>Hello, @Name!</h2>
    
   @code {
      
       private string Name { get; set; } = "Blazor";      
 } 

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