The Blazor @onclick directive attribute binds a button click to a .NET method or expression. The component can use that handler to communicate with other components or update displayed data. section 10.2.2
Common uses in the SportsStore administration interface include:
- Invoking a callback with an order ID to select an order for shipping or resetting. section 10.2.2
- Calling a refresh method or deleting a product and updating the displayed data. section 10.2.2 section 10.3.6
...
<button class="btn btn-sm btn-danger"
@onclick="@(e => OrderSelected.InvokeAsync(o.OrderID))">
@ButtonLabel
</button>
...
The order-table button passes the selected order ID to the OrderSelected callback when clicked. section 10.2.2

