A set of technologies in the .NET Framework for building web applications and XML web services.
My guess is you have JavaScript code on the razor page interfering with the Blazor’s JavaScript event handling.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I've used the following code in multiple blazor web assembly applications hosted on a razor pages page under .net 5.0 and .net 6.0 before now.
An application I was forced to upgrade to .net 7.0 has rendered the onclick command completely useless
What do I need to do to fix it, please?
<p>@(myinteger)</p>
<button @onclick="MyFunction">Click here</button>
@code
{
private int myinteger = 0;
private void MyFunction()
{
myinteger++;
}
}
A set of technologies in the .NET Framework for building web applications and XML web services.
A free and open-source web framework that enables developers to create web apps using C# and HTML, developed by Microsoft.
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
My guess is you have JavaScript code on the razor page interfering with the Blazor’s JavaScript event handling.
These days one needs to "set the render mode" all over the place,
something like
@rendermode InteractiveServer
might do the trick