Event Handling

Learn how to handle click events in Blazor WebAssembly.

Razor components handle events by using an HTML element attribute named @on{EVENT} where EVENT is the name of the event.

The following code calls the OnClickHandler method when the button is clicked:

Get hands-on with 1200+ tech skills courses.