I have a razor page project where I want to include a composant from a blazor client project. The two project are in dotnet 6.
I manage to have the composant working and to pass some value to it (via the param-{ParameterName})
<component type="typeof(KeywordFilterBlazor.Pages.Index)" render-mode="WebAssemblyPrerendered" param-TestValue="@Model.TestValue" />And now I want to be able to react to event inside the component, like a button click.
I already have a project in Web forms that communicate with a Blazor component (instantiated with an iframe) via javascript message.
I can use the javascript message but I would like to know if there is a better solution since integrating Blazor into Razor is directly supported (not like in the old web forms project).
It can be something like this exemple where he uses from field to get the value from blazor fields into the razor form. But I would also like to the button inside the blazor component, with a preference if I can have multiple button.
Does someone has a good solution to handle this problem ?