✅ is there a way to add a C# event handler to .cshtml button
title says it all.
i want a button that changes the text of a <p> element when pressed
13 Replies
Judging by
.cshtml
, you're not using Blazor, but rather MVC or Razor Pages
So the answer is no
Use Javascripti can use Blazor as well im just trying to test stuff
what is the blazor way to do it
If you use Blazor then yes, you can
will it run client side
Blazor WASM will, yes
bet
cause i want to make smth small with a library that cant be used on most servers
im getting some "Operation not supported on this platform"
you can do it server side with blazor
a request that must happen on client
you can't run C# code on the client outside of blazor WASM or blazor hybrid
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
I got it to
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Use the /close command to mark a forum thread as answered