Different method calls in Blazor
问题 I am experimenting with Blazor for some time now and I am trying to find an explanation about the difference between <input type="button" onclick="@methodCall()">Something</button> and <input type="button" @onclick="() => methodCall()">Something</button> Why is @ expected before onclick vs @ being part of value? 回答1: When you place the "@" before the "onclick", you create a compiler directive. This constructs is going to be enforced in the future, if it is not yet enforced. It instructs the