Skip to content

How add value changed logic when using @bind-Value? #1126

Answered by dvoituron
Strypper asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, this is the classic Blazor way for Two-way binding.

Two-way binding in Blazor uses a naming convention. If we want to bind to a property named SomeProperty, then we need an event call-back named SomeProperyChanged. This call-back must be invoked any time the component updates SomeProperty.
https://blazor-university.com/components/two-way-binding/

See also

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Strypper
Comment options

You must be logged in to vote
2 replies
@vnbaaij
Comment options

@woaidianqian
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants