I have been working on "https://www.codeproject.com/Articles/5264915/Explore-Blazor-WebAssembly-use-custom-style-call-e#ptwwwcicpagafwai" and have mostly got it working.
In this project is a page Working.razor which uses 4 buttons to call a method each with a different parameter, an example follows:
Five
I have hard coded the Generate(5) method, which makes the page do what it is built for, that is to generate dummy data for insertion into an IBM Cloudant database. So after a few modifications the whole thing works, except for those 4 buttons.
One I have tried
One
<button class="w3-button w3-large w3-amber" @onClick="Generate(1)">One</button>
which also does nothing, and a few variations on
@onClick="@(() => Generate(5))"
That last one gives the error "Cannot convert lambda expression to type 'object' because it is not a delegate type".
I would like to understand how these buttons were supposed to work and how to make a button that will successfully pass an integer to the Generate method.
What I have tried:
I posted a similar question in the article comments some time ago, no response.
This is hopeless, my button code keeps disappearing. Please see the article.