How to do two-way data bind in Blazor ?

In blazor two-way data, binding refers to sharing data between a component class and its template. Data change in one place, it will automatically reflate at the other end. For instance

if you change the value of the input box, then it will also update the value of the attached property in a component class.

Example : 


        public string Name;

    <input type="text" placeholder="Enter Name" @bind-value="@Name" 
    Name : <span>@Name</span>


Post a Comment