Skip to content

Feedback for blazor data binding in v7 #28245

@lonix1

Description

@lonix1

1

In this section there's a typo in the code:

        inputValue = newValue.Length > 4 ? "Long!" : inputValue = newValue;

Should be

        inputValue = newValue.Length > 4 ? "Long!" : newValue;

2

In this section it says:

> For two-way data binding in ASP.NET Core 7.0 or later, we recommend using @bind:get/@bind:set modifiers. For more information, see the @bind:get/@bind:set in the opening section of this article.

But it doesn't say why? I assume that the new v7 syntax allows one to perform a "set" with an async method, which cannot be done using a regular c# (sync) property setter. That is useful, for e.g., when doing autocomplete. Maybe there are other reasons?


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions