Blazor component communication

Calling a method in a child component

Component markup file: RpModal.Razor

Component code-behind file: RpModal.razor.cs

Setting ShowConfirmation to true makes the modal visible. Calling the Show method sets ShowConfirmation to true and calls StateHasChanged.

There are two ways the parent component can call ShowConfirmation:

Directly from code>@onclick</code with a lambda:

Or with a method in the parent component:

Leave a Comment

Your email address will not be published. Required fields are marked *