How does two-way data binding work in Blazor, and what is the underlying Value / ValueChanged pattern behind @bind?

Last updated 5 July 2026

  • @bind is compiler sugar: it expands to a value assignment plus an onchange handler that writes the input back to the field.

  • For your own components, a parameter X plus an EventCallback named XChanged enables @bind-X (e.g. Value/ValueChanged).

  • Updates fire on onchange (blur) by default. Use @bind:event="oninput" to update on every keystroke.

  • https://learn.microsoft.com/en-us/aspnet/core/blazor/components/data-binding?view=aspnetcore-10.0
  • https://www.scribd.com/document/665747494/ASP-net-Core-Blazor-Data-Binding-Microsoft-Learn
  • https://www.meziantou.net/two-way-binding-in-blazor.htm
  • https://www.ssw.com.au/rules/blazor-use-bind-value-after-instead-of-valuechanged
  • https://www.telerik.com/blazor-ui/documentation/knowledge-base/value-changed-validation-model
All Blazor interview questions