Adding EventCallback Parameters
Explore how to add EventCallback parameters to Blazor modal dialogs to handle user interactions with OK and Cancel buttons. This lesson guides you through updating button events, modifying the dialog component, and testing functionality to create customizable dialog boxes using templated components.
We'll cover the following...
We'll cover the following...
We need to add @onclick events for both the “OK” button and the “Cancel” button. We do this as follows:
- Return to Visual Studio.
- Open the
Shared\Dialog.razorfile. - Add
@onclickevents to each of the buttons: