what is diffrent bewtten bind-value, bind , value in blazor webAssembly

hamed farjad 40 Reputation points
2023-02-20T17:21:07.89+00:00
@page "/"

<input @bind="someThing" />
<input @bind-value="someThing" />
<input value="someThing" />

@code
{
    string someThing;
}
Developer technologies | .NET | Blazor
0 comments No comments

Answer accepted by question author
Bruce (SqlWork.com) 85,456 Reputation points
2023-02-20T19:01:16.62+00:00

the @bind is used for 2 way binding. to know which property to bind to, you include the -<name>. @bind-Value will bind to the Value property. in the case of input, Value is the default, you you can shorten to @bind

if a property is set without a @bind, it is one way (set only)

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 85,456 Reputation points
    2023-02-20T19:01:41.18+00:00

    (extra post to display)

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.