Our latest


Announcements, Blogs, Releases and much much more...

  • Read our latest news and announcements, hot off the press.

Announcements






Category Blazor FAQ

Published on 12-May-2021

What is the difference between using @bind and @bind-value?
What is the difference between using @bind and @bind-value?
What is the difference between using @bind and @bind-value?

In Blazor, there is no significant difference between using these two attributes.

In Blazor, there is no significant difference between using these two attributes. The @bind attribute is a shorthand of the @bind-value attribute and its delegate will trigger the ValueChanged event of the component.

The usage of both the @bind and @bind-value attributes in the following code examples are functionally equivalent.

@bind

<input type="text" @bind="user" />

@bind-value

<input type="text" @bind-value="user" @bind-value:event="onchange"/>


Created on 12-May-2021 Last updated 23-May-2021

Assigned Tag
  • Blazor
  • FAQ